1.1 --- a/DateSupport.py Mon Apr 02 20:17:59 2012 +0200
1.2 +++ b/DateSupport.py Wed Apr 18 01:17:58 2012 +0200
1.3 @@ -910,14 +910,14 @@
1.4
1.5 def getCurrentDate():
1.6
1.7 - "Return the current date as a (year, month, day) tuple."
1.8 + "Return the current date as a Date instance."
1.9
1.10 today = datetime.date.today()
1.11 return Date((today.year, today.month, today.day))
1.12
1.13 def getCurrentMonth():
1.14
1.15 - "Return the current month as a (year, month) tuple."
1.16 + "Return the current month as a Month instance."
1.17
1.18 today = datetime.date.today()
1.19 return Month((today.year, today.month))
1.20 @@ -929,4 +929,11 @@
1.21 today = datetime.date.today()
1.22 return today.year
1.23
1.24 +def getCurrentTime():
1.25 +
1.26 + "Return the current time as a DateTime instance."
1.27 +
1.28 + now = datetime.datetime.utcnow()
1.29 + return DateTime((now.year, now.month, now.day, now.hour, now.minute, now.second, "UTC"))
1.30 +
1.31 # vim: tabstop=4 expandtab shiftwidth=4