pike.git
/
src
/
builtin.cmod
version
»
Context lines:
10
20
40
80
file
none
3
pike.git/src/builtin.cmod:510:
/* } */ /*! @decl int(0..1) localtime( int time ) *! Initialize the struct tm to the local time for the specified *! unix time_t. */ PIKEFUN int(0..1) localtime( int _t ) { time_t t = _t; struct tm *res = localtime_zone( &t, &THIS->t );
+
if( !res )
+
RETURN 0;
/* These are supposedly correctly by localtime_zone. */ SET_GMTOFF(res, GET_GMTOFF(&(THIS->t))); SET_ZONE(res, GET_ZONE(&(THIS->t)));
-
if( !res )
-
RETURN 0;
+
THIS->t = *res; THIS->modified = 1; RETURN 1; } /*! @decl int(0..1) gmtime( int time ) *! Initialize the struct tm to the UTC time for the specified *! unix time_t. */