override_timezone
| Definition: |
include builtins\timedate.e
override_timezone(string tz, string desc, atom adj, object dsr=0, string dst="") |
| Description: | dynamically modify/specify timezone details. |
| pwa/p2js: | Supported. |
| Comments: |
Unfortunately, there is no internationally agreed standard for timezone abbreviations that includes
GMT/BST/etc. Time zone abbreviations are not necessarily unique, for example BST may refer to
British Summer Time or Bangladesh Standard Time. Other collisions include EST (Eastern/Egypt),
IST (Irish/India/Iran/Israel), and MST (Mountain/Myanmar).
This routine allows you to replace any such clashes, or add new entries. The table cannot meaningfully hold two versions of a timezone code, so instead the application must swap any clashes in and out as required. Most real-world applications would probably/hopefully only need one or two quick fixes rather than have to resort to frenetic swapping, and the latter would need an entirely independent bespoke mechanism to control it. Less importantly but still perhaps beneficial is the ability to extend the tables without modifying the original source code (builtins\timedate.e). It is highly unlikely this routine can be used successfully without detailed reference to the inner workings of builtins\timedate.e and hence there is little point further documenting the parameters, nor are any examples likely to help (one can be found in the source code, not worth reproducing here). I am perfectly open to any extensions/alternatives to this routine, or for example, adding some kind of hook routines at selected key points. If you think you can identify the latter and that it would help, let me know. |