1
I have been working on my first module called Culex_dj_rotator but have been recieving emails on how to deal with time formats.
The problem is this. My script saves starttime, endtime as 24 hour format: (24:00:00) but english user would like to display my data as 12 hour format (12:00:00 AM), and also in my block it shows current show in 24 hours etc etc and further more it gives a faulty time (an hour off in this case). However I found a soulution to the last problem..
$tidnu = date("H:i:s", mktime(date("H")-1, date("i"), date("s"), date("n"), date("j"), date("Y")));
I have now. Made a config option in adminsite, givin the oportunity to choose between (local timezone), (Hour format) and storing in a database.
I just down know how to retrieve and use properly.
You can see my script here
http://www.culex.dk/culex_v10c.zipthe problem is in culex\blocks\block.php and I would like to:
Retrieve the config data from dj_dj_config.
Set variables and change the timeformat according to this. This mean it must also be able to change the retrieved $start, $endtime etc from the dj_dj table.
I'm puzzled but I hope you can find a good solution for me to use
Sincerly Michael
Programming is like sex:
One mistake and you have to support it for the rest of your life.