예제 #1
0
def main():
    site = sites.load(args.site)
    if args.date is None:
        date = datetime.date.today()
    else:
        date = args.date

    print "Converting UTC to LST for %s on %s" % \
                (site.name, date.strftime("%b %d, %Y"))

    for utc in args.utc:
        utc_hours = utils.parse_timestr(utc)
        utc_hms = utils.deg_to_hmsstr(utc_hours*15)

        lst_hours = site.utc_to_lst(utc_hours, date)
        lst_hms = utils.deg_to_hmsstr(lst_hours*15)
        print "    UTC: %s = LST: %s" % (utc_hms[0], lst_hms[0])
예제 #2
0
def main():
    site = sites.load(args.site)
    if args.date is None:
        date = datetime.date.today()
    else:
        date = args.date

    print "Converting LST to UTC for %s on %s" % \
                (site.name, date.strftime("%b %d, %Y"))

    for lst in args.lst:
        lst_hours = utils.parse_timestr(lst)
        lst_hms = utils.deg_to_hmsstr(lst_hours*15)

        utc_hours = site.lst_to_utc(lst_hours, date)
        utc_hms = utils.deg_to_hmsstr(utc_hours*15)
        print "    LST: %s = UTC: %s" % (lst_hms[0], utc_hms[0])
예제 #3
0
 def sent(self):
     return utils.parse_timestr(self.msg["created_at"])
예제 #4
0
 def updated_at(self):
     return utils.parse_timestr(self.thread["last_message_sent_at"])
예제 #5
0
 def __call__(self, parser, namespace, values, option_string):
     timestr = values
     time = utils.parse_timestr(timestr)
     setattr(namespace, self.dest, time)