00001 #include <stdio.h> 00002 #include <stdlib.h> 00003 #include <ctype.h> 00004 #include <strings.h> 00005 #include <sys/types.h> 00006 #include <sys/time.h> 00007 00008 00009 static void sprint_time_ISO (char *tstring, double t) 00010 { 00011 sprint_time(tstring,t,"UTC",0); 00012 tstring[4] = tstring[7] = '-'; 00013 tstring[10] = 'T'; 00014 tstring[19] = '\0'; 00015 } 00016 00017 int main(int argc, char *argv[]) { 00018 char string[128]; 00019 double t; 00020 00021 t = strtod(argv[1], NULL); 00022 sprint_time(string, t, "UTC", 0); 00023 printf("%s\n", string); 00024 }