Don't depend on the default formatting of wx.DateTime objects for

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
This commit is contained in:
Robin Dunn 2005-04-09 20:08:49 +00:00
parent 88609ec9a8
commit c5d11c71d7

View 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):