Package schrodinger :: Package job :: Module timestamp
[hide private]
[frames] | no frames]

Module timestamp

Functions [hide private]
 
output_timezone(timezone)
string
long(timesec=None)
Return a 'long'-style timestamp representing the given time.
string
short(timesec=None)
Return a 'short'-style timestamp representing the given time.
string
ymdhms(timesec=None)
Return a 'ymdhms'-style timestamp representing the given time.
int
dhm_to_seconds(dhms)
Interpret the given string as a time interval with units.
Variables [hide private]
  wdaystr = ('Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat')
  monstr = ('Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Au...
  month_number = {'Apr': 3, 'Aug': 7, 'Dec': 11, 'Feb': 1, 'Jan'...
  timezone_adjustment = 0
  last_short_time = 0
  last_short = ''
  __package__ = 'schrodinger.job'
  i = 11
  month = 'Dec'
Function Details [hide private]

long(timesec=None)

 

Return a 'long'-style timestamp representing the given time.

Parameters:
  • timesec - the time, in seconds since the epoch
Returns: string
the 'long' timestamp

short(timesec=None)

 

Return a 'short'-style timestamp representing the given time.

Parameters:
  • timesec - the time, in seconds since the epoch
Returns: string
the 'short' timestamp

ymdhms(timesec=None)

 

Return a 'ymdhms'-style timestamp representing the given time.

Parameters:
  • timesec - the time, in seconds since the epoch
Returns: string
the 'ymdhms' timestamp

dhm_to_seconds(dhms)

 

Interpret the given string as a time interval with units.

Parameters:
  • dhhms - a time interval, with optional units 's', 'm', 'h', or 'd'
Returns: int
the interval in seconds

Variables Details [hide private]

monstr

Value:
('Jan',
 'Feb',
 'Mar',
 'Apr',
 'May',
 'Jun',
 'Jul',
 'Aug',
...

month_number

Value:
{'Apr': 3,
 'Aug': 7,
 'Dec': 11,
 'Feb': 1,
 'Jan': 0,
 'Jul': 6,
 'Jun': 5,
 'Mar': 2,
...