Added new fucntion to datetime library
This commit is contained in:
parent
f63765c066
commit
ae5d76432e
2 changed files with 10 additions and 0 deletions
|
|
@ -129,6 +129,13 @@ def checkdatetime(y, m, d, h, mi, s):
|
|||
except:
|
||||
return False
|
||||
|
||||
# Obtain the actual time in gmt
|
||||
|
||||
def now():
|
||||
|
||||
actual=datetime.today()
|
||||
|
||||
return actual.strftime(sql_format_time)
|
||||
|
||||
def obtain_timestamp(timeform):
|
||||
|
||||
|
|
|
|||
|
|
@ -38,6 +38,9 @@ class TestFieldMethods(unittest.TestCase):
|
|||
|
||||
self.assertEqual(date_from_utc, '2012/10/27')
|
||||
|
||||
#today=datetime.now()
|
||||
|
||||
#print(today)
|
||||
|
||||
"""
|
||||
tz=datetime.obtain_timezone('Europe/Madrid')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue