| View previous topic :: View next topic |
| Author |
Message |
cgruber
Joined: 06 Sep 2005 Posts: 36
|
Posted: Mon Sep 12, 2005 7:06 am Post subject: os.date |
|
|
When I run os.date("%c") on my psp the time is wrong.
It should give me 14:44 but I get 22:14.
What am I doing wrong? the lua player on windows displays the correct time. |
|
| Back to top |
|
 |
chaos
Joined: 10 Apr 2005 Posts: 135
|
Posted: Mon Sep 12, 2005 1:04 pm Post subject: |
|
|
if i had to make a guess, i'd say it was timezone related.. _________________ Chaosmachine Studios: High Quality Homebrew. |
|
| Back to top |
|
 |
MasterQ
Joined: 01 Oct 2005 Posts: 7
|
Posted: Sat Oct 01, 2005 10:25 am Post subject: |
|
|
| I am having the exact same problem. I think the Lua Player is making an error with timezones. I am on EST (-5) and it randomly gives me either EST, which is what I want, or GMT(0), which is the time before the timezone is taken into account. |
|
| Back to top |
|
 |
2Xtremes2004
Joined: 31 Aug 2005 Posts: 53
|
Posted: Sun Oct 09, 2005 3:20 am Post subject: |
|
|
Why does 12:00 = 0:00 and will this be fixed in a future version of Lua? _________________ I want my money back!? |
|
| Back to top |
|
 |
Shine
Joined: 03 Dec 2004 Posts: 728 Location: Germany
|
|
| Back to top |
|
 |
KawaGeo
Joined: 27 Aug 2005 Posts: 191 Location: Calif Mountains
|
Posted: Sun Oct 09, 2005 5:17 am Post subject: |
|
|
Ver 0.11 fixed it alright but I think Daylight Saving Time is not applied. My timezone here is GMT-8. PSP itself shows correct time with Daylight Saving. _________________ Geo Massar
Retired Engineer |
|
| Back to top |
|
 |
2Xtremes2004
Joined: 31 Aug 2005 Posts: 53
|
Posted: Sun Oct 09, 2005 6:33 am Post subject: |
|
|
Yes, 12:00 pm = 0:00 is what I ment, but I now see how it is set up after looking at the two links you provided. Thx
I was able to get the time and date feature formatted the way I like. :)
However I did have one question about it: %p shows the Prefix "AM" and "PM", and %P is supose to show the prefix "am" and "pm", but %P dont show anything.
Is there something else I can use to get it to show "am" and "pm"? _________________ I want my money back!? |
|
| Back to top |
|
 |
Shine
Joined: 03 Dec 2004 Posts: 728 Location: Germany
|
Posted: Sun Oct 09, 2005 6:55 am Post subject: |
|
|
| 2Xtremes2004 wrote: | However I did have one question about it: %p shows the Prefix "AM" and "PM", and %P is supose to show the prefix "am" and "pm", but %P dont show anything.
Is there something else I can use to get it to show "am" and "pm"? |
I don't know, perhaps this is a bug in the libc from PSPSDK, but as a workaround you could use string.tolower or you can built your own string, like in http://www.luaplayer.org/gallery/clock.lua.txt with "*t" and using the returned table. |
|
| Back to top |
|
 |
mystic_memories
Joined: 12 Mar 2006 Posts: 12
|
Posted: Sun Mar 12, 2006 8:30 am Post subject: |
|
|
| Has this bug been re-introduce recently? When I do a os.date("*t"), the hour doesn't seem to take my timezone into consideration. i.e. I get the GMT time rather than the time of my local timezone. I also tried os.date("!*t") as well, they both return the same result. |
|
| Back to top |
|
 |
matriculated
Joined: 04 Mar 2006 Posts: 31
|
Posted: Mon Mar 13, 2006 9:59 am Post subject: |
|
|
| Same thing over here. The clock program is 12 hours ahead |
|
| Back to top |
|
 |
Shine
Joined: 03 Dec 2004 Posts: 728 Location: Germany
|
Posted: Mon Mar 13, 2006 10:04 am Post subject: |
|
|
| There is still a problem with the timezone, see http://wiki.ps2dev.org/psp:lua_player:todos . Would be nice, if always the time would be used, which you can see in the normal PSP menu, but I don't know how to do it. |
|
| Back to top |
|
 |
|