[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

SF.net SVN: ledger-smb:[5839] trunk



Revision: 5839
          http://sourceforge.net/p/ledger-smb/code/5839
Author:   einhverfr
Date:     2013-05-20 11:35:10 +0000 (Mon, 20 May 2013)
Log Message:
-----------
Moving new code to ISO datestlyes to avoid other date issues.  Not really safe to merge to 1.3

Modified Paths:
--------------
    trunk/LedgerSMB.pm
    trunk/sql/modules/admin.sql

Modified: trunk/LedgerSMB.pm
===================================================================
--- trunk/LedgerSMB.pm	2013-05-20 09:41:35 UTC (rev 5838)
+++ trunk/LedgerSMB.pm	2013-05-20 11:35:10 UTC (rev 5839)
@@ -375,11 +375,11 @@
     $self->get_user_info;
 
     my %date_setting = (
-        'mm/dd/yy' => "SQL, US",
-        'mm-dd-yy' => "POSTGRES, US",
-        'dd/mm/yy' => "SQL, EUROPEAN",
-        'dd-mm-yy' => "POSTGRES, EUROPEAN",
-        'dd.mm.yy' => "GERMAN",
+        'mm/dd/yy' => "ISO, MDY",
+        'mm-dd-yy' => "ISO, MDY",
+        'dd/mm/yy' => "ISO, DMY",
+        'dd-mm-yy' => "ISO, DMY",
+        'dd.mm.yy' => "ISO, DMY",
     );
 
     $self->{dbh}->do("set DateStyle to '".$date_setting{$self->{_user}->{dateformat}}."'");

Modified: trunk/sql/modules/admin.sql
===================================================================
--- trunk/sql/modules/admin.sql	2013-05-20 09:41:35 UTC (rev 5838)
+++ trunk/sql/modules/admin.sql	2013-05-20 11:35:10 UTC (rev 5839)
@@ -302,7 +302,7 @@
 within on week.$$;
 
 CREATE OR REPLACE FUNCTION user__change_password(in_new_password text)
-returns int SET datestyle = 'ISO, YMD' as
+returns int SET datestyle = 'ISO, YMD' as -- datestyle needed due to legacy code
 $$
 DECLARE
 	t_expires timestamp;
@@ -340,7 +340,7 @@
     in_password TEXT,
     in_pls_import BOOL
 ) returns int 
-SET datestyle = 'ISO, YMD'
+SET datestyle = 'ISO, YMD' -- needed due to legacy code regarding datestyles
 AS $$
     DECLARE
     

This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.