From c5d11c71d791122ec50379c15887898a4d49f1af Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Sat, 9 Apr 2005 20:08:49 +0000 Subject: [PATCH] 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 --- wxPython/wx/lib/printout.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/wxPython/wx/lib/printout.py b/wxPython/wx/lib/printout.py index 1ca001d975..086a6c1fc0 100644 --- a/wxPython/wx/lib/printout.py +++ b/wxPython/wx/lib/printout.py @@ -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): -- 2.45.2