Time/Clock/Seasons

Forum
Last Post
Threads / Messages

Cindykt

Member
Member
Joined
Apr 9, 2011
Messages
24
Points
0
Mysidian Dollar
3,484
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?
 
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.
 
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.
 
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.
 
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 :)
 
Similar threads
Thread starter Title Forum Replies Date
GeneticAlpha Adding a date and time clock Questions and Supports 0

Similar threads

Users who are viewing this thread

  • Forum Contains New Posts
  • Forum Contains No New Posts

Forum statistics

Threads
4,280
Messages
33,132
Members
1,603
Latest member
Monako
BETA

Latest Threads

Top