PDA

View Full Version : Time/Clock/Seasons


Cindykt
05-10-2011, 09:12 AM
I think it would be really cool to have a time zone feature, like game time. It could also have seasons and hopefully wouldn't be that hard to do. Thoughts?

Rozel
05-10-2011, 11:29 AM
That would be amazing to have. Just sayin'.

rickasawr
05-10-2011, 05:41 PM
It would have to include javascript, i would think.
but a nice idea. :happycbig:

Nemesis
05-11-2011, 01:34 AM
Sounds kinda interesting. What would the seasons do? Differnet adopts available?

Cindykt
05-11-2011, 01:40 AM
Nothing, just for show XD

Hall of Famer
05-11-2011, 09:30 PM
umm a timezone feature? I have two ideas how this can be done.

1. Upgrade your PHP to version 5.3.0+. In PHP 5.3.0+, there are lots of new date/time functions that were previously unavailable in PHP 5.2.x or earlier versions. Not sure if it will help with timezone, but its worth trying. However, most shared host do not allow PHP upgrade, so...
2. Use cronjobs.

Kaeliah
05-12-2011, 01:06 PM
This actually could be done WITHOUT cronjobs, and WITHOUT upgrading PHP and WITHOUt Javascript.

You'd need some sort of array or switch statement, then the user identifies what timezone their in. Depending on the difference in time zone from the default you'd add or subtract hours and output their current time whenever a page loads.

The only risk when doing a feature that includes this is if someone wants a pet only available at night, then can simply change their timezone and the code will register night time and that pet will be available.

Hall of Famer
05-12-2011, 01:35 PM
Good point Kaeliah, I wonder if the date/time functions in old PHP versions actually can check timezone. But yeah, it wont hurt to try.

Kaeliah
05-12-2011, 01:55 PM
you could do localtime() which is PHP 4 & 5.

Cindykt
05-16-2011, 04:10 AM
Okay... now I'm confuzzled XD

Rozel
05-16-2011, 07:51 PM
When I want features I'd like it if someone was like,
"go to this file and find "php code here",
"Then under it write "php code here". "

xD; I also don't know much about PHP, just enough to take code someone personally gives me. I want this a lot too (: