Subversion Repositories SmartDukaan

Rev

Rev 2625 | Rev 2764 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2625 Rev 2693
Line 182... Line 182...
182
def get_py_datetime(date, timeval):
182
def get_py_datetime(date, timeval):
183
    # This should be a command line argument.
183
    # This should be a command line argument.
184
    # Refer http://docs.python.org/library/time.html#time.strftime to
184
    # Refer http://docs.python.org/library/time.html#time.strftime to
185
    # get a complete list of format specifiers available for date time.
185
    # get a complete list of format specifiers available for date time.
186
    time_format = "%d-%b-%y %H%M"
186
    time_format = "%d-%b-%y %H%M"
-
 
187
    if timeval is None or timeval == '--':
-
 
188
        timeval='0000'
187
    time_string = date + " " + timeval
189
    time_string = date + " " + timeval
188
    mytime = time.strptime(time_string, time_format)
190
    mytime = time.strptime(time_string, time_format)
189
    return datetime.datetime(*mytime[:6])
191
    return datetime.datetime(*mytime[:6])
190
 
192
 
191
def main():
193
def main():