Skip to content
This repository was archived by the owner on Nov 16, 2025. It is now read-only.

Commit fd78f7e

Browse files
authored
Merge pull request #6 from CHTJonas/patch-1
Include timestamp in API requests
2 parents cab4356 + 1b97fab commit fd78f7e

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

OmniRig_VB_DEMO/Form1.vb

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,12 +141,14 @@
141141
Else
142142
RadioName = "OmniRig 2"
143143
End If
144+
145+
Dim timestamp as String = DateTime.UtcNow.ToString("yyyy/MM/dd HH:mm:ss")
144146

145-
Dim myString As String = "{""radio"": """ + RadioName + """, ""frequency"": """ + newfreq.ToString + """, ""mode"": """ + Label6.Text + """, ""key"": """ + My.Settings.CloudlogAPIKey + """}"
147+
Dim myString As String = "{""radio"": """ + RadioName + """, ""frequency"": """ + newfreq.ToString + """, ""mode"": """ + Label6.Text + """, ""timestamp"": """ + timestamp + """, ""key"": """ + My.Settings.CloudlogAPIKey + """}"
146148

147149
Try
148150
Dim responsebytes = client.UploadString(My.Settings.CloudlogURL + "/index.php/api/radio", myString)
149-
ToolStripStatusLabel1.Text = "Cloudlog Synced: " + DateTime.UtcNow
151+
ToolStripStatusLabel1.Text = "Cloudlog Synced: " + timestamp
150152
Catch ex As Exception
151153
ToolStripStatusLabel1.Text = "Cloudlog Synced: Failed, check URL/API"
152154
End Try

0 commit comments

Comments
 (0)