963 return 0; |
963 return 0; |
964 } |
964 } |
965 #ifdef __FreeBSD__ |
965 #ifdef __FreeBSD__ |
966 return timelocal(&tm); |
966 return timelocal(&tm); |
967 #else |
967 #else |
968 return mktime(&tparts) - timezone; |
968 return mktime(&tm) - timezone; |
969 #endif |
969 #endif |
970 } |
970 } |
971 |
971 |
972 int pg_convert_timestamp_tm(const char *timestamp, struct tm *tm) { |
972 int pg_convert_timestamp_tm(const char *timestamp, struct tm *tm) { |
973 // TODO: this is a very basic implementation that needs some work |
973 // TODO: this is a very basic implementation that needs some work |