From aa31cd603884c2631f65f7d808aab925c3cdebc4 Mon Sep 17 00:00:00 2001 From: dpage Date: Thu, 16 Apr 2009 11:02:13 +0000 Subject: [PATCH] Ensure account expiration dates are displayed and handled consistently [Ashesh Vashi/Dave Page] git-svn-id: svn://svn.pgadmin.org/trunk/pgadmin3@7813 a7884b65-44f6-0310-8a51-81a127f17b15 --- pgadmin/ctl/calbox.cpp | 8 ++++---- pgadmin/schema/pgRole.cpp | 2 +- pgadmin/schema/pgUser.cpp | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/pgadmin/ctl/calbox.cpp b/pgadmin/ctl/calbox.cpp index 387c8c23f..9835e8f39 100644 --- a/pgadmin/ctl/calbox.cpp +++ b/pgadmin/ctl/calbox.cpp @@ -72,7 +72,7 @@ bool wxCalendarBox::Create(wxWindow *parent, { wxString txt; if (date.IsValid()) - txt = date.FormatDate(); + txt = date.FormatISODate(); if ( !wxControl::Create(parent, id, pos, size, style | wxCLIP_CHILDREN | wxWANTS_CHARS, @@ -106,7 +106,7 @@ bool wxCalendarBox::Create(wxWindow *parent, m_txt=new wxTextCtrl(this, CTRLID_TXT, txt, wxDefaultPosition, size, TXTCTRL_FLAGS); m_txt->Connect(wxID_ANY, wxID_ANY, wxEVT_KEY_DOWN, wxKeyEventHandler(wxCalendarBox::OnEditKey), 0, this); m_txt->Connect(wxID_ANY, wxID_ANY, wxEVT_KILL_FOCUS, wxFocusEventHandler(wxCalendarBox::OnKillFocus), 0, this); - SetFormat(wxT("%x")); + SetFormat(wxT("%Y-%m-%d")); m_btn = new wxBitmapButton(this, CTRLID_BTN, bmp, wxDefaultPosition, bs); @@ -339,7 +339,7 @@ bool wxCalendarBox::SetValue(const wxDateTime& date) if (m_cal) { if (date.IsValid()) - m_txt->SetValue(date.FormatDate()); + m_txt->SetValue(date.FormatISODate()); else m_txt->SetValue(wxEmptyString); } @@ -443,7 +443,7 @@ void wxCalendarBox::OnSelChange(wxCalendarEvent &ev) { if (m_cal) { - m_txt->SetValue(m_cal->GetDate().FormatDate()); + m_txt->SetValue(m_cal->GetDate().FormatISODate()); if (ev.GetEventType() == wxEVT_CALENDAR_DOUBLECLICKED) { DropDown(false); diff --git a/pgadmin/schema/pgRole.cpp b/pgadmin/schema/pgRole.cpp index 7866a385f..0ebfbc50e 100644 --- a/pgadmin/schema/pgRole.cpp +++ b/pgadmin/schema/pgRole.cpp @@ -255,7 +255,7 @@ void pgRole::ShowTreeDetail(ctlTree *browser, frmMain *form, ctlListView *proper properties->AppendItem(_("Name"), GetName()); properties->AppendItem(_("OID"), GetOid()); - properties->AppendItem(_("Account expires"), GetAccountExpires()); + properties->AppendItem(_("Account expires"), DateToAnsiStr(GetAccountExpires())); properties->AppendItem(_("Can login?"), BoolToYesNo(GetCanLogin())); properties->AppendItem(_("Superuser?"), BoolToYesNo(GetSuperuser())); properties->AppendItem(_("Create databases?"), BoolToYesNo(GetCreateDatabase())); diff --git a/pgadmin/schema/pgUser.cpp b/pgadmin/schema/pgUser.cpp index 68b0e101d..89c3e0c16 100644 --- a/pgadmin/schema/pgUser.cpp +++ b/pgadmin/schema/pgUser.cpp @@ -195,7 +195,7 @@ void pgUser::ShowTreeDetail(ctlTree *browser, frmMain *form, ctlListView *proper properties->AppendItem(_("Name"), GetName()); properties->AppendItem(_("User ID"), GetUserId()); - properties->AppendItem(_("Account expires"), GetAccountExpires()); + properties->AppendItem(_("Account expires"), DateToAnsiStr(GetAccountExpires())); properties->AppendItem(_("Superuser?"), BoolToYesNo(GetSuperuser())); properties->AppendItem(_("Create databases?"), BoolToYesNo(GetCreateDatabase())); properties->AppendItem(_("Update catalogs?"), BoolToYesNo(GetUpdateCatalog())); -- 2.39.5