Apr 8, 2021 Replies: 5 Usage example: Code: Copy Dim formatter As GMTFormatter formatter.Initialize("yyyy-MM-dd-'T'HH:mm:ss'Z'") Log(formatter.Format(DateTime.Now)) Attachments GMTFormatter.b4xlib GMTFormatter.b4xlib 899 bytes · Views: 923 Click to expand...
Usage example: Code: Copy Dim formatter As GMTFormatter formatter.Initialize("yyyy-MM-dd-'T'HH:mm:ss'Z'") Log(formatter.Format(DateTime.Now))
AnandGupta Expert Licensed User Longtime User Apr 8, 2021 #2 I maybe missing here, but where we can use it ? i.e. benefit of it. Regards, Anand
Erel B4X founder Staff member Licensed User Longtime User Apr 9, 2021 #3 I wrote it to help a user who needed to generate date strings with GMT time zone, and then send them to a web service. This can be done by calling DateTime.SetTimeZoneOffset(0), however it will have other unwanted side effects.
I wrote it to help a user who needed to generate date strings with GMT time zone, and then send them to a web service. This can be done by calling DateTime.SetTimeZoneOffset(0), however it will have other unwanted side effects.
AnandGupta Expert Licensed User Longtime User Apr 9, 2021 #4 Erel said: I wrote it to help a user Click to expand... Oh Ok. Thanks. Regards, Anand
JackKirk Well-Known Member Licensed User Longtime User Apr 10, 2021 #5 AnandGupta said: I maybe missing here, but where we can use it ? i.e. benefit of it. Click to expand... I'm the mystery user and this solves a real nagging edge case, see: https://www.b4x.com/android/forum/threads/problem-with-changing-time-zones.129458/ and https://www.b4x.com/android/forum/threads/problem-with-nstimezone.129457/ the problem is associated with using SetTimeZone in long running apps that run over a daylight saving change event - I'll leave you to read the above links but note that this issue has arisen for others in the forums - although I suspect some did not fully comprehend what was happening (my situation until fairly recently). Again - many thanks Erel... Last edited: Apr 10, 2021
AnandGupta said: I maybe missing here, but where we can use it ? i.e. benefit of it. Click to expand... I'm the mystery user and this solves a real nagging edge case, see: https://www.b4x.com/android/forum/threads/problem-with-changing-time-zones.129458/ and https://www.b4x.com/android/forum/threads/problem-with-nstimezone.129457/ the problem is associated with using SetTimeZone in long running apps that run over a daylight saving change event - I'll leave you to read the above links but note that this issue has arisen for others in the forums - although I suspect some did not fully comprehend what was happening (my situation until fairly recently). Again - many thanks Erel...
AnandGupta Expert Licensed User Longtime User Apr 10, 2021 #6 JackKirk said: I'm the mystery user and this solves a real nagging edge case, see Click to expand... Ahh.. thanks for the link. Now I understand ? Regards Anand
JackKirk said: I'm the mystery user and this solves a real nagging edge case, see Click to expand... Ahh.. thanks for the link. Now I understand ? Regards Anand