Re: Swatch Internet Time
| From: | Colin Viebrock | Date: | Fri, 21 Sep 2001 15:04:28 +0000 |
| Subject: | Re: Swatch Internet Time | ||
| References: | 1 | Groups: | php.mirrors |
| Request: | Send a blank email to php-mirrors+get-6528@lists.php.net to get a copy of this message | ||
Digging through the PHP source code, you could've found:
beat = (((((long)the_time)-(((long)the_time) -
((((long)the_time) % 86400) + 3600))) * 10) / 864);
while (beat < 0) {
beat += 1000;
}
beat = beat % 1000;
sprintf(tmp_buff, "%03d", beat); /* SAFE */
strcat(return_value->value.str.val, tmp_buff);
break;
That's all C, but should be pretty easy to convert to whatever language you
want. "the_time" is (I believe) just the UNIX timestamp for the time you
want to convert.
- Colin