Mailing list archives: January 2008

Site index · List index
Message listThread · Author · Date
Parlante - - - ### Helper constants - pacific = ICUtzinfo.getInstance("US/Pacific") - eastext/ht Sat, 09 Apr, 03:30
Parlante - - - ### Helper constants - pacific = ICUtzinfo.getInstance("US/Pacific") - eastext/ht Sat, 09 Apr, 03:30
Parlante [No Subject] Sat, 09 Apr, 03:30
ange limits and - # MAXYEAR/MINYEAR, since a now timestamp really shouldn't be outside those - # ranges - new_timestamp = timegm(timetuple) - - activity.Time.auto_update = False - activity.Time.advance(new_timestamp - activity.Time._now) - -def resetNow(): - activity.Time.auto_update = True - activity.Time.tick() - -def nowTimestamp(): - """The number of seconds betwen the UTC epoch and now.""" - return activity.Time._now - -class TimeZone(trellis.Component, context.Service): - - default = trellis.attr(ICUtzinfo.default) - - @trellis.perform - def save_default(self): - ICUtzinfo.setDefault(self.default) - - class _FloatingTZInfo(ICUtzinfo): - def __init__(self): pass - - def utcoffset(self, dt): - return TimeZone.default.utcoffset(dt) - - def dst(self, dt): - return TimeZone.default.dst(dt) - - def __repr__(self): - return "FloatingTZ(%r)" % (TimeZone.default,) - - floating = _FloatingTZInfo() - - def __getitem__(self, key): - result = ICUtzinfo.getInstance(key) - if result.tzid == 'GMT' and key != 'GMT': - return None - else: - return result - - - ### Helper constants - pacific = ICUtzinfo.getInstance("US/Pacific") - eastext/ht Sat, 07 Apr, 02:32
m.@osafoundation.org> ow(): - activity.Time.auto_update = True - activity.Time.tick() - -def nowTimestamp(): - """The number of seconds betwen the UTC epoch and now.""" - return activity.Time._now - -class TimeZone(trellis.Component, context.Service): - - default = trellis.attr(ICUtzinfo.default) - - @trellis.perform - def save_default(self): - ICUtzinfo.setDefault(self.default) - - class _FloatingTZInfo(ICUtzinfo): - def __init__(self): pass - - def utcoffset(self, dt): - return TimeZone.default.utcoffset(dt) - - def dst(self, dt): - return TimeZone.default.dst(dt) - - def __repr__(self): - return "FloatingTZ(%r)" % (TimeZone.default,) - - floating = _FloatingTZInfo() - - def __getitem__(self, key): - result = ICUtzinfo.getInstance(key) - if result.tzid == 'GMT' and key != 'GMT': - return None - else: - return result - - - ### Helper constants - pacific = ICUtzinfo.getInstance("US/Pacific") - eastext/ht Mon, 03 May, 09:42
Message listThread · Author · Date
Box list
Jul 20081
Mar 20081
Jan 20085
Dec 200715
Nov 20078
Oct 200749
Sep 200725
Aug 2007137
Jul 2007246
Jun 200761
May 200710
Apr 200744
Mar 200716
Feb 20076
Jan 200721
Dec 20065
Nov 200613
Oct 200613
Sep 200623
Aug 200643
Jul 200621
Jun 200652
May 200652
Apr 200629
Mar 200639
Feb 200677
Jan 200620
Dec 200510
Sep 20058
Jun 20052
Apr 20051
Mar 20052
Feb 20054
Dec 20045
Nov 20042
Sep 20041
Aug 20045
Jun 20047
Apr 20041
Feb 20042
Jan 20042
Dec 20031
Nov 20039
Aug 20036
Jun 20033
Mar 20031
Feb 20031
Jan 20033
Dec 20021
Nov 20022
Oct 20024