Displaying 1 result from an estimated 1 matches for "utc_tm".
2005 Feb 18
1
creating POSIXct dates in C
...with this issue?
I've looked at R-2.0.1/src/main/datetime.c, but I was not able to find
an example that I could easily pull from that file.
Thanks in advance,
Whit
Here is my example in C:
#include <stdio.h>
#include <time.h>
int main() {
struct tm localtime_tm;
struct tm utc_tm;
time_t localtime_posix;
time_t utc_posix;
char buf[255];
strptime("1970-01-01", &localtime_tm);
localtime_posix = mktime(&localtime_tm);
// this prints 0
// which is what the time would be if we were in GMT
// how do we convert this time to our timezone
// t...