ASE Home Page Products Download Purchase Support About ASE
ChartDirector Support
Forum HomeForum Home   SearchSearch

Message ListMessage List     Post MessagePost Message

  Convert ChartTime back to Unix Timestamp
Posted by Chris on Nov-30-2011 09:12
How do I convert a ChartTime back to a Unix Timestamp in a 32-bit PHP environment?

Thanks.

  Re: Convert ChartTime back to Unix Timestamp
Posted by Peter Kwan on Dec-01-2011 02:21
Hi Chris,

You may try:

# $t = chartTime value
$yyyymmdd = getChartYMD($t);
$unix_timeStamps = mktime(floor(fmod($t, 86400) / 3600), floor(fmod($t, 3600) / 60), fmod(t, 60), floor(($yyyymmdd % 10000) / 100), $yyyymmdd % 100, floor($yyyymmdd / 10000));

Hope this can help.

Regards
Peter Kwan