Groups | Search | Server Info | Login | Register


Groups > comp.soft-sys.math.maple > #1365

Re: Time zones

Newsgroups comp.soft-sys.math.maple
Date 2022-06-21 14:37 -0700
References <e08bea44-59ad-4cf1-ac87-082b24ff742cn@googlegroups.com> <70c79900-625b-44cf-ae82-1f443abb66fdn@googlegroups.com>
Message-ID <312ddcba-ba01-46e4-9d9e-728e53056ab0n@googlegroups.com> (permalink)
Subject Re: Time zones
From jfh <harperjf2@gmail.com>

Show all headers | View raw


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.)

Back to comp.soft-sys.math.maple | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

Time zones jfh <harperjf2@gmail.com> - 2022-06-16 18:17 -0700
  Re: Time zones acer <maple@rogers.com> - 2022-06-21 09:13 -0700
    Re: Time zones jfh <harperjf2@gmail.com> - 2022-06-21 14:37 -0700
      Re: Time zones acer <maple@rogers.com> - 2022-06-21 15:01 -0700
        Re: Time zones acer <maple@rogers.com> - 2022-06-21 15:05 -0700

csiph-web