def _GetTimestamps():
 time_offset = (0 if options.options.use_utc else time.timezone)
 cur_day = datetime.datetime.now().replace(hour=0, minute=0, second=0, microsecond=0)
 utc_cur_day = LocalDatetimeToUTCDatetime(cur_day)
 if options.options.start_timestamp:
  start_timestamp = options.options.start_timestamp
 elif options.options.start_date:
  utc_dt = ParseIso8601DatetimeToUTCDatetime(options.options.start_date)
  start_timestamp = (UTCDatetimeToTimestamp(utc_dt) + time_offset)
 else:
  start_timestamp = UTCDatetimeToTimestamp(utc_cur_day)
 if options.options.end_timestamp:
  end_timestamp = options.options.end_timestamp
 elif options.options.end_date:
  utc_dt = ParseIso8601DatetimeToUTCDatetime(options.options.end_date)
  end_timestamp = (UTCDatetimeToTimestamp(utc_dt) + time_offset)
 else:
  end_timestamp = (UTCDatetimeToTimestamp(utc_cur_day) + SECONDS_PER_DAY)
 return (start_timestamp, end_timestamp)

def _GetTimestamps ( ) : time_offset = ( 0 if options . options . use_utc else time . timezone ) cur_day = datetime . datetime . now ( ) . replace ( hour = 0 , minute = 0 , second = 0 , microsecond = 0 ) utc_cur_day = LocalDatetimeToUTCDatetime ( cur_day ) if options . options . start_timestamp : start_timestamp = options . options . start_timestamp elif options . options . start_date : utc_dt = ParseIso8601DatetimeToUTCDatetime ( options . options . start_date ) start_timestamp = ( UTCDatetimeToTimestamp ( utc_dt ) + time_offset ) else : start_timestamp = UTCDatetimeToTimestamp ( utc_cur_day ) if options . options . end_timestamp : end_timestamp = options . options . end_timestamp elif options . options . end_date : utc_dt = ParseIso8601DatetimeToUTCDatetime ( options . options . end_date ) end_timestamp = ( UTCDatetimeToTimestamp ( utc_dt ) + time_offset ) else : end_timestamp = ( UTCDatetimeToTimestamp ( utc_cur_day ) + SECONDS_PER_DAY ) return ( start_timestamp , end_timestamp )
returns the start and end timestamps based on command line flags .