File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -1034,15 +1034,23 @@ function Connection(args) {
1034
1034
case 1114 : // Timestamp, no timezone
1035
1035
value = new Date ( value ) ;
1036
1036
case 1184 : // Timestamp, with timezone
1037
+ // Initial value:
1038
+ // "2011-02-01 21:00:52.353444-07"
1039
+ // Needs to become:
1040
+ // "2011-02-01 21:00:52.353 GMT-0700"
1037
1041
if ( value [ value . length - 1 ] . toLowerCase ( ) == 'z' ) {
1038
1042
// It's in UTC time
1039
1043
// So, we add the appropriate modifiers.
1040
- value = new Date ( value . slice ( 0 , value . length - 1 ) + " GMT+0000" ) ;
1044
+ var tz = value . slice ( 0 , value . length - 1 ) ;
1045
+ tz = tz . slice ( 0 , tz . length - 4 ) ;
1046
+ value = new Date ( tz + " GMT+0000" ) ;
1047
+ console . log ( value ) ;
1041
1048
}
1042
1049
else {
1043
1050
var tz = value . slice ( value . length - 3 , value . length ) ; // last three.
1044
1051
var orig = value ;
1045
- value = new Date ( value . slice ( 0 , value . length - 3 ) + " GMT" + tz + "00" ) ;
1052
+ orig = orig . slice ( 0 , orig . length - 7 ) ;
1053
+ value = new Date ( orig + " GMT" + tz + "00" ) ;
1046
1054
}
1047
1055
}
1048
1056
}
You can’t perform that action at this time.
0 commit comments