Under linux, the cmd "date -u" will give time in utc.

Вс, 20 окт 2013, Ric Tikkanz писал(а):
> I agree it would be great to make these additions to the addon
> cross-platform. I'm also clueless on the best ways to do this outside
> Windows (which is why they aren't there already ;))
> Anybody have any advice?
> 
> 
> On Sun, Oct 20, 2013 at 1:37 PM, Pascal Jasmin <[email protected]>wrote:
> 
> > adding 4 functions to this file:
> >
> > ~addons/types/datetime/datetime.ijs
> >
> >
> > Now_z_ =: 6!:0
> > utcBIAS_z_ =: 0,~ >1{ getTimeZoneInfo_rgsdatetime_ ''
> > utc_z_ =: tsPlus&utcBIAS
> > utcnow_z_ =: utc@:Now
> >
> >
> >    utcBIAS
> > 300 0
> > this gives a utc adjusted current local time:
> >    utcnow ''
> > 2013 10 20 1 9 21.346
> >
> > utcBIAS relies on the windows api.  Though its a noun set once at startup,
> > It's kludgy in case of running after a DST change or other system clock
> > change.
> >
> >
> > Is there a cygwin (or other windows) api call to get utctime, that would
> > be easily portable to unix/mac and smartphones?
> >
> > If not, do each of the platforms have a command line or dll call to set
> > utcBIAS?
> >
> > which approach would be recommended?
> > ----------------------------------------------------------------------
> > For information about J forums see http://www.jsoftware.com/forums.htm
> >
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm

-- 
regards,
====================================================
GPG key 1024D/4434BAB3 2008-08-24
gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3
gpg --keyserver subkeys.pgp.net --armor --export 4434BAB3
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to