.Net Send message at midnight based on TimeZone? -
I have some datapoints that contain offset from GMT (in seconds). I want to send a message through a socket at midnight, sending a message is not a problem, just having trouble determining the time based on the offset.
Anyone have any suggestions for this?
Since UTC and GMT are identical, you can use this code.
int secondsOffset = 100; Date Time UTCMDriday = DateTime Specify the quad (date-time. Today, DateTimeCent.UTC); Date time utcWithOffset = utcMidnight.AddSeconds (second offset); Console.light line ("offset at UTC: + UTCWith Offset"); Console.light line ("Offset at local time:" + UTCWide Offset.Tolic Time ());
The first writeline shows time in the UTC timezone. The second Wrightline shows time in the local time zone. Difficult parts may be found in the base time, whether it was midnight today or midnight last night?
Comments
Post a Comment