All Samples(340) | Call(338) | Derive(0) | Import(2)
tzset(zone) Initialize, or reinitialize, the local timezone to the value stored in os.environ['TZ']. The TZ environment variable should be specified in standard Unix timezone format as documented in the tzset man page (eg. 'US/Eastern', 'Europe/Amsterdam'). Unknown timezones will silently fall back to UTC. If the TZ environment variable is not set, the local timezone is set to the systems best guess of wallclock time. Changing the TZ environment variable without calling tzset *may* change the local timezone used by methods such as localtime, but this behaviour should not be relied on.
src/p/y/python-stategen-HEAD/examples/ical/icalpretty.py python-stategen(Download)
def getutc(_):
oldtz = os.environ.get('TZ', None)
os.environ['TZ'] = _.tzid
time.tzset()
if ':' in _.value:
date_fmt = "%Y%m%dT%H:%M:%S"
else:
os.environ['TZ'] = oldtz
else:
del os.environ['TZ']
time.tzset()
return utc
def __repr__(_):
src/g/r/graphite-web-0.9.6/webapp/graphite/render/glyph.py graphite-web(Download)
limitations under the License.""" import os, cairo, math, itertools from time import strftime, localtime, timezone, altzone, daylight, tzset, mktime from calendar import timegm from urllib import unquote_plus from ConfigParser import SafeConfigParser
def tz_difference(tz): os.environ['TZ'] = tz tzset() captured_time = localtime() tz_delta = int(timegm(captured_time) - mktime(captured_time)) try:
src/j/y/jython-HEAD/sandbox/tobias/jython/CPythonLib/_strptime.py jython(Download)
def __calc_timezone(self):
# Set self.timezone by using time.tzname.
# Do not worry about possibility of time.tzname[0] == timetzname[1]
# and time.daylight; handle that in strptime .
try:
time.tzset()
except AttributeError:
src/i/r/ironruby-HEAD/External.LCA_RESTRICTED/Languages/IronPython/27/Lib/_strptime.py ironruby(Download)
def __calc_timezone(self):
# Set self.timezone by using time.tzname.
# Do not worry about possibility of time.tzname[0] == timetzname[1]
# and time.daylight; handle that in strptime .
try:
time.tzset()
except AttributeError:
src/i/r/ironruby-HEAD/External.LCA_RESTRICTED/Languages/CPython/27/Lib/_strptime.py ironruby(Download)
def __calc_timezone(self):
# Set self.timezone by using time.tzname.
# Do not worry about possibility of time.tzname[0] == timetzname[1]
# and time.daylight; handle that in strptime .
try:
time.tzset()
except AttributeError:
src/j/y/jython-HEAD/jython/CPythonLib/_strptime.py jython(Download)
def __calc_timezone(self):
# Set self.timezone by using time.tzname.
# Do not worry about possibility of time.tzname[0] == timetzname[1]
# and time.daylight; handle that in strptime .
try:
time.tzset()
except AttributeError:
src/p/y/pypy3-HEAD/lib-python/3.1.2/_strptime.py pypy3(Download)
def __calc_timezone(self):
# Set self.timezone by using time.tzname.
# Do not worry about possibility of time.tzname[0] == timetzname[1]
# and time.daylight; handle that in strptime .
try:
time.tzset()
except AttributeError:
src/p/y/pypy3-HEAD/lib-python/2.5.2/_strptime.py pypy3(Download)
def __calc_timezone(self):
# Set self.timezone by using time.tzname.
# Do not worry about possibility of time.tzname[0] == timetzname[1]
# and time.daylight; handle that in strptime .
try:
time.tzset()
except AttributeError:
src/p/y/pypy-HEAD/lib-python/2.5.2/_strptime.py pypy(Download)
def __calc_timezone(self):
# Set self.timezone by using time.tzname.
# Do not worry about possibility of time.tzname[0] == timetzname[1]
# and time.daylight; handle that in strptime .
try:
time.tzset()
except AttributeError:
src/s/p/spike-HEAD/vendor/stackless/v2.5.1/Lib/_strptime.py spike(Download)
def __calc_timezone(self):
# Set self.timezone by using time.tzname.
# Do not worry about possibility of time.tzname[0] == timetzname[1]
# and time.daylight; handle that in strptime .
try:
time.tzset()
except AttributeError:
1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 Next