now:=Date(timezone="NZST");Error, (in Date:-ModuleCopy) unrecognised timezone: NZST
now:=Date(timezone="GMT+12:00");now := <Date: 2022-06-17T13:07:28 GMT+12:00>
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>
On Wednesday, June 22, 2022 at 4:13:45 AM UTC+12, acer wrote:embargoed copy of NZ's latest budget and released it 1 hour too soon. Our government were not happy.)
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.
Using the 2nd column here, ie. "TZ database name", https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#Listnow:=Date(timezone="GMT+12:00");now := <Date: 2022-06-17T13:07:28 GMT+12:00>
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);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-
"2022-06-21T12:09:07 EDT"
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.
Using the 2nd column here, ie. "TZ database name", https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#Listnow:=Date(timezone="GMT+12:00");now := <Date: 2022-06-17T13:07:28 GMT+12:00>
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"
On Tuesday, June 21, 2022 at 5:37:33 PM UTC-4, jfh wrote:embargoed copy of NZ's latest budget and released it 1 hour too soon. Our government were not happy.)
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.
Using the 2nd column here, ie. "TZ database name", https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#Listnow:=Date(timezone="GMT+12:00");now := <Date: 2022-06-17T13:07:28 GMT+12:00>
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);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-
"2022-06-21T12:09:07 EDT"
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.
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 307 |
Nodes: | 16 (2 / 14) |
Uptime: | 45:52:16 |
Calls: | 6,910 |
Files: | 12,377 |
Messages: | 5,429,452 |