Skip to content

Commit 6809f7f

Browse files
committed
modify convertTimestampToSV()
1 parent 41ff4f4 commit 6809f7f

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/gstype_perl.i

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,9 +92,13 @@
9292
int microSecond;
9393
sscanf(strBuf, "%d-%d-%dT%d:%d:%d.%dZ", &year, &month, &day, &hour, &minute, &second, &miliSecond);
9494
microSecond = miliSecond * 1000;
95-
if (year >= 1900) {
95+
if (year >= 1900) { //Year in perl has format 1900 + xx
9696
year = year - 1900;
9797
}
98+
//Month in Perl start from 0 to 11 (in output of gsFormatTime(), month start from 1 to 12)
99+
if (month) {
100+
month--;
101+
}
98102

99103
// Convert to array
100104
AV *dateTimeArr = newAV();

0 commit comments

Comments
 (0)