[Gambas-user] Timezone format

Tobias Boege taboege at gmail.com
Tue Apr 9 11:10:18 CEST 2019

On Tue, 09 Apr 2019, Hans Lehmann wrote:
> Hello.
> Does anyone know the reason why the offset to UTC does not have the official
> format ∓ HH*:*MM, but a gambas-specific format ∓ HHMM?

"Official" by who? ISO 8601 [1] allows both formats. HHMM is not a gambas-
specific format as it is the standard way of writing timezones in email,
as per RFC 2822 [2]. Look at how your email client displays the timezone
of this email, chances are it's HHMM. That said, I found that RFC 3339 [3]
does require the colon in the middle. [ Note that RFCs are internet-related
standards, so I don't know which should be given the greatest weight. ]

So, my answer is: because it's a standard format used in electronic
communication between humans. And it's very much not gambas-specific:
it's not even Gambas who chooses this format, it's the C library's
strftime(3), whose documentation makes a reference to said RFC 2822.


[1] https://www.cl.cam.ac.uk/~mgk25/iso-time.html
[2] https://www.ietf.org/rfc/rfc2822.txt
[3] https://www.ietf.org/rfc/rfc3339.txt

"There's an old saying: Don't change anything... ever!" -- Mr. Monk

More information about the User mailing list