You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ TZ='UTC' date
Thu Sep 19 03:18:14 AM UTC 2024
$ TZ='Europe/Rome' date
Thu Sep 19 05:18:14 AM CEST 2024
$ TZ='CET' date
Thu Sep 19 05:18:14 AM CEST 2024
BusyBox for Windows:
$ TZ='UTC' date
Thu Sep 19 03:18:14 UTC 2024
$ TZ='Europe/Rome' date
Thu Sep 19 04:18:14 ope 2024
$ TZ='CET' date
Thu Sep 19 03:18:14 CET 2024
There are 2 errors: the hour and the timezone string.
Is it possible to fix them?
The text was updated successfully, but these errors were encountered:
@rmyorston
Is it possible to implement a custom code for some cases?
My idea is: if the TZ match this regexp [A-Za-z]{3,}[+-][0-9]* then use custom code and skip the windows API.
Looking at bash online the letters only have a minimum limit of 3 chars but they have no maximum limit so long strings are allowed.
Even a string of over 4000 chars can be displayed correctly.
If the number is higher of 24 it is changed to 24.
If the number is missing it is changed to 0.
-1 sum 1.
+1 subtract 1.
Examples:
$ TZ='AfgdfhTHTHtHhh+1' date
Thu Sep 19 04:03:37 PM AfgdfhTHTHtHhh 2024
$ TZ='ABC-' date
Thu Sep 19 05:03:37 PM ABC 2024
$ TZ='CET-1' date
Thu Sep 19 06:03:37 PM CET 2024
$ TZ='CEST-2' date
Thu Sep 19 07:03:37 PM CEST 2024
Bash online:
BusyBox for Windows:
There are 2 errors: the hour and the timezone string.
Is it possible to fix them?
The text was updated successfully, but these errors were encountered: