View previous topic :: View next topic |
Author |
Message |
snyder
Joined: 21 Dec 2005 Posts: 57 Location: Zagreb
|
Posted: 03.07.2006 11:00 Post subject: vrijeme |
|
|
dakle imam vrijeme u ovom formatu:
1151916920
kako i jel se uopće može prebaciti u ovaj:
10:55:20 03.07.2006
?? |
|
|
Back to top |
|
|
unique
Joined: 29 Mar 2004 Posts: 655
|
Posted: 03.07.2006 11:08 Post subject: Re: vrijeme |
|
|
snyder wrote: | dakle imam vrijeme u ovom formatu:
1151916920
kako i jel se uopće može prebaciti u ovaj:
10:55:20 03.07.2006
?? |
pretpostavljam da je to unix timestamp (koji btw. vraca funkcija time() ) i da se radio o phpu, onda samo s date() funkcijom to pretvoris u koji format oces -> http://www.zend.com/manual/function.date.php
time() wrote: | Returns the current time measured in the number of seconds since the Unix Epoch (January 1 1970 00:00:00 GMT). |
dakle 1151916920, bi se citalo 1151916920 sekundi nakon unixa :) |
_________________ Activate interlock! Dynotherms connected! Infracells up! Mega thrusters are go! LET'S GO VOLTRON FORCE! |
|
Back to top |
|
|
snyder
Joined: 21 Dec 2005 Posts: 57 Location: Zagreb
|
Posted: 03.07.2006 11:15 Post subject: |
|
|
e to, zafaljujem |
|
|
Back to top |
|
|
unique
Joined: 29 Mar 2004 Posts: 655
|
Posted: 03.07.2006 11:43 Post subject: |
|
|
btw. sjecamo li se famoznog y2k buga :) be aware! here comes y2038 bug :))
dakle ako mislis da ce ti projekt bit aktivan i tamo oko 2038. godine bolje koristi unsinged 32bitni integer tip podataka :D ili jos bolje y2106 bug :D za tu ce ti trebat 64bitni tip :)
(2038-1970)*365*24*60*60=2 144 448 000
2^32=4 294 967 296 (unsigned)
2^31-1=2 147 483 647 (signed)
(2106-1970)*365*24*60*60=4 288 896 000
2^64=18 446 744 073 709 551 616 (gaziliun? :))
i ps. http://en.wikipedia.org/wiki/Unix_billennium |
_________________ Activate interlock! Dynotherms connected! Infracells up! Mega thrusters are go! LET'S GO VOLTRON FORCE! |
|
Back to top |
|
|
snyder
Joined: 21 Dec 2005 Posts: 57 Location: Zagreb
|
Posted: 03.07.2006 11:57 Post subject: |
|
|
lol, teško a i do tad će biti php67 pa će u njemu biti nešto za to |
|
|
Back to top |
|
|
|