• Time zones

    From jfh@21:1/5 to All on Thu Jun 16 18:17:48 2022
    Wishing to use Date in my own time zone I tried

    now:=Date(timezone="NZST");
    Error, (in Date:-ModuleCopy) unrecognised timezone: NZST

    Maple must have a list of acceptable time zone names. How does one find it? Experimentation eventually found that at present the following works, though of course it will need changing in September when we start daylight saving., and back again in April 2023.

    now:=Date(timezone="GMT+12:00");
    now := <Date: 2022-06-17T13:07:28 GMT+12:00>

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From acer@21:1/5 to jfh on Tue Jun 21 09:13:43 2022
    On Thursday, June 16, 2022 at 9:17:51 PM UTC-4, jfh wrote:
    Wishing to use Date in my own time zone I tried

    now:=Date(timezone="NZST");
    Error, (in Date:-ModuleCopy) unrecognised timezone: NZST

    Maple must have a list of acceptable time zone names. How does one find it? Experimentation eventually found that at present the following works, though of course it will need changing in September when we start daylight saving., and back again in April 2023.

    now:=Date(timezone="GMT+12:00");
    now := <Date: 2022-06-17T13:07:28 GMT+12:00>


    Using the 2nd column here, ie. "TZ database name",
    https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List

    restart;
    with(Calendar):
    d1:=Date(timezone="Pacific/Auckland");
    d1 := <Date: 2022-06-22T04:09:07 New Zealand Time>

    d2:=Date(timezone="GMT+12:00")
    d2 := <Date: 2022-06-22T04:09:07 GMT+12:00>

    DateDifference(Date(timezone="Pacific/Auckland"),
    Date(timezone="GMT+12:00"));
    0

    Format(d1);
    "2022-06-21T12:09:07 EDT"

    Format(d2);
    "2022-06-21T12:09:07 EDT"

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From acer@21:1/5 to jfh on Tue Jun 21 15:01:28 2022
    On Tuesday, June 21, 2022 at 5:37:33 PM UTC-4, jfh wrote:
    On Wednesday, June 22, 2022 at 4:13:45 AM UTC+12, acer wrote:
    On Thursday, June 16, 2022 at 9:17:51 PM UTC-4, jfh wrote:
    Wishing to use Date in my own time zone I tried

    now:=Date(timezone="NZST");
    Error, (in Date:-ModuleCopy) unrecognised timezone: NZST

    Maple must have a list of acceptable time zone names. How does one find it?
    Experimentation eventually found that at present the following works, though of course it will need changing in September when we start daylight saving., and back again in April 2023.

    now:=Date(timezone="GMT+12:00");
    now := <Date: 2022-06-17T13:07:28 GMT+12:00>
    Using the 2nd column here, ie. "TZ database name", https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List

    restart;
    with(Calendar):
    d1:=Date(timezone="Pacific/Auckland");
    d1 := <Date: 2022-06-22T04:09:07 New Zealand Time>

    d2:=Date(timezone="GMT+12:00")
    d2 := <Date: 2022-06-22T04:09:07 GMT+12:00>

    DateDifference(Date(timezone="Pacific/Auckland"), Date(timezone="GMT+12:00"));
    0

    Format(d1);
    "2022-06-21T12:09:07 EDT"

    Format(d2);
    "2022-06-21T12:09:07 EDT"
    Thank you. I live in Wellington, which is NZ's capital city, so I had not thought of trying Pacific/Auckland. Let's hope that Maple does better than a famous US newspaper when we or US move in or out of daylight saving. (They had been given a time-
    embargoed copy of NZ's latest budget and released it 1 hour too soon. Our government were not happy.)

    I'll reiterate that that timezome name -- Pacific/Aukland -- is not something Maple developers cooked up. It's part of a reasonably standard set of names, managed by international committee. It took me less than a few minutes to find it via google.

    You appear to have got stuck on trying to work with just some abbreviations.

    Note that your attempt to utilize NZST may not have fared better (even if recognized), as far as switching to Daylight Saving goes. NZDT is not the very same thing.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From jfh@21:1/5 to acer on Tue Jun 21 14:37:31 2022
    On Wednesday, June 22, 2022 at 4:13:45 AM UTC+12, acer wrote:
    On Thursday, June 16, 2022 at 9:17:51 PM UTC-4, jfh wrote:
    Wishing to use Date in my own time zone I tried

    now:=Date(timezone="NZST");
    Error, (in Date:-ModuleCopy) unrecognised timezone: NZST

    Maple must have a list of acceptable time zone names. How does one find it?
    Experimentation eventually found that at present the following works, though of course it will need changing in September when we start daylight saving., and back again in April 2023.

    now:=Date(timezone="GMT+12:00");
    now := <Date: 2022-06-17T13:07:28 GMT+12:00>
    Using the 2nd column here, ie. "TZ database name", https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List

    restart;
    with(Calendar):
    d1:=Date(timezone="Pacific/Auckland");
    d1 := <Date: 2022-06-22T04:09:07 New Zealand Time>

    d2:=Date(timezone="GMT+12:00")
    d2 := <Date: 2022-06-22T04:09:07 GMT+12:00>

    DateDifference(Date(timezone="Pacific/Auckland"), Date(timezone="GMT+12:00"));
    0

    Format(d1);
    "2022-06-21T12:09:07 EDT"

    Format(d2);
    "2022-06-21T12:09:07 EDT"

    Thank you. I live in Wellington, which is NZ's capital city, so I had not thought of trying Pacific/Auckland. Let's hope that Maple does better than a famous US newspaper when we or US move in or out of daylight saving. (They had been given a time-
    embargoed copy of NZ's latest budget and released it 1 hour too soon. Our government were not happy.)

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From acer@21:1/5 to acer on Tue Jun 21 15:05:58 2022
    On Tuesday, June 21, 2022 at 6:01:30 PM UTC-4, acer wrote:
    On Tuesday, June 21, 2022 at 5:37:33 PM UTC-4, jfh wrote:
    On Wednesday, June 22, 2022 at 4:13:45 AM UTC+12, acer wrote:
    On Thursday, June 16, 2022 at 9:17:51 PM UTC-4, jfh wrote:
    Wishing to use Date in my own time zone I tried

    now:=Date(timezone="NZST");
    Error, (in Date:-ModuleCopy) unrecognised timezone: NZST

    Maple must have a list of acceptable time zone names. How does one find it?
    Experimentation eventually found that at present the following works, though of course it will need changing in September when we start daylight saving., and back again in April 2023.

    now:=Date(timezone="GMT+12:00");
    now := <Date: 2022-06-17T13:07:28 GMT+12:00>
    Using the 2nd column here, ie. "TZ database name", https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List

    restart;
    with(Calendar):
    d1:=Date(timezone="Pacific/Auckland");
    d1 := <Date: 2022-06-22T04:09:07 New Zealand Time>

    d2:=Date(timezone="GMT+12:00")
    d2 := <Date: 2022-06-22T04:09:07 GMT+12:00>

    DateDifference(Date(timezone="Pacific/Auckland"), Date(timezone="GMT+12:00"));
    0

    Format(d1);
    "2022-06-21T12:09:07 EDT"

    Format(d2);
    "2022-06-21T12:09:07 EDT"
    Thank you. I live in Wellington, which is NZ's capital city, so I had not thought of trying Pacific/Auckland. Let's hope that Maple does better than a famous US newspaper when we or US move in or out of daylight saving. (They had been given a time-
    embargoed copy of NZ's latest budget and released it 1 hour too soon. Our government were not happy.)
    I'll reiterate that that timezome name -- Pacific/Aukland -- is not something Maple developers cooked up. It's part of a reasonably standard set of names, managed by international committee. It took me less than a few minutes to find it via google.

    You appear to have got stuck on trying to work with just some abbreviations.

    Note that your attempt to utilize NZST may not have fared better (even if recognized), as far as switching to Daylight Saving goes. NZDT is not the very same thing.

    ...and, naturally, I misspell Auckland in a bad moment. Apologies.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)