mc-Studio > mc-Studio
Timestamps
GarnetT:
Is anyone having much luck with the time functions? Specifically I want to return the current hour from modul . Secondly, when I read this value, the format (converted to string) appears as such:
2017-05-16T00:59:59+00:00
My PC clock is reading that same date, but the time is 7:42 pm. Hours, minutes, and seconds seem to be a bit off.
None the less, I still want to fetch the hours integer value.
Garnet
Nick_W:
Checkout my Time library, everything i know about timestamps is in it.
BTW the module time is really the gateway time (obtained from NTP server), and sent to the module when it connects. Timezone doesn't really seem to work though...
GarnetT:
Thanks Nick,
I've just google'd you and am checking it out now.
Garnet
bdevlin:
I can't seem to get datetime.now() until the second request from a module. It kinda makes sense I guess, but that means the modules first response is bad data.
mc-John:
The code to get date/time info looks like this:
--- Code: --- Dim dat As DateTime = DateTime.Now
Dim hr As Integer = dat.Hour
Dim sec As Integer = dat.Second
Dim month As Integer = dat.Month
--- End code ---
Navigation
[0] Message Index
[#] Next page
Go to full version