All pastes #926924 Raw Edit

Untitled

public text v1 · immutable
·published 2008-03-03 22:22 UTC
rendered paste body
> 3)convert data from int/string to unix timestamp or vice versa for 
> these objects  as some DateFormatter methods accept these objects as
> parameters

those functions are defined in ext/date/lib/timelib.h.

From int/string to unix TS you would need timelib_strtotime(), 
timelib_fill_holes() and timelib_update_ts().

From TS to string, php_format_date()

However, it is not really a good idea to convert them to an integer, as 
this loses Timezone information. In that case, it might be better to use 
unixtime2locale() and use the broken up time that that uses.