]> git.saurik.com Git - wxWidgets.git/commitdiff
Don't depend on the default formatting of wx.DateTime objects for
authorRobin Dunn <robin@alldunn.com>
Sat, 9 Apr 2005 20:08:49 +0000 (20:08 +0000)
committerRobin Dunn <robin@alldunn.com>
Sat, 9 Apr 2005 20:08:49 +0000 (20:08 +0000)
extracting a date and time string.  The format depends on locale and
platform defaults.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@33458 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

wxPython/wx/lib/printout.py

index 1ca001d9757d0cc1cd6a1af89f52396d4e18663a..086a6c1fc08c188c941baff284ed22cd0cf9bb6a 100644 (file)
@@ -173,10 +173,9 @@ class PrintBase:
         return date + ' ' + time
 
     def GetNow(self):
-        full = str(wx.DateTime_Now())        # get the current date and time in print format
-        flds = full.split()
-        date = flds[0]
-        time = flds[1]
+        now = wx.DateTime.Now()
+        date = now.FormatDate()
+        time = now.FormatTime()
         return date, time
 
     def SetPreview(self, preview):