Drake CMS Official Forums - read-only archive

You are reading the Drake CMS Official Forums archive, available for historical purposes only.

Drake CMS has been rebranded into Lanius CMS, visit the new Lanius CMS Official Forums if you need support about Lanius CMS or Drake CMS -> Lanius CMS migration.



Home page Off-topic Dicussions > Re: Timezones with PHP4 Permanent link to this page
 
 
Author Message:
name
Re: Timezones with PHP4
29 June 2007 19:43
Anonymous I just found a link to the Timezones with PHP4 implementation. I downloaded the files but I'm a little confused as to how to use it exactly. Can someone give me just a quick example of how it should be used? I'm still a novice in php so pardon my ignorance if it's obvious.
 
trex1512
Re: Timezones with PHP4
02 July 2007 02:50
Anonymous Hi and welcome...

I am sorry but my knowledge level matches yours.. smile
One of the php gurus will come good in due course...

I didn't want to just leave your question hanging as if noone cared...somone will...


Male ducks are No1
 
visualcom
Re: Timezones with PHP4
17 July 2007 00:27
Anonymous I too had problems with these... Namely, I ran into the following issues:

1.) Assuming this is PHP code, there are '{' and '}' missing from if statements, so I am guessing what the logic should be.
2.) There is a reference to $my->GetTimeZone(). I have yet to figure out where that occurs.... I am assuming that GetTimeZone is a function that they have created somewhere else to return my timezone?
3.) I am also trying to figure out if I can use this once on start-up with my initial configs on opening my site, or if I have to call it every time I want to use a getdate() call.

I appreciate being able to find codes and ideas, but having to understand logic and fix bugs is not what I desired to do.
 
legolas558
Re: Timezones with PHP4
17 July 2007 08:34
Anonymous Quote:

I too had problems with these...

Looks like I totally missed out this topic - sorry sad
Anyway, there is no generic code example provviden, the wording should suffice; the SVN links point to the Drake CMS implementation. If I was providing a generic code example, then I could be blamed.

Quote:

Namely, I ran into the following issues:

1.) Assuming this is PHP code, there are '{' and '}' missing from if statements, so I am guessing what the logic should be.

I have not added them for single instructions - a bad coding practice? ermm
Quote:

2.) There is a reference to $my->GetTimeZone(). I have yet to figure out where that occurs.... I am assuming that GetTimeZone is a function that they have created somewhere else to return my timezone?

Yes, it picks the timezone from the database - I thought this was quite clear and gave the idea of "user timezone retrieval"

Quote:

3.) I am also trying to figure out if I can use this once on start-up with my initial configs on opening my site, or if I have to call it every time I want to use a getdate() call.


Once on start-up (for example, functions cannot be defined more than once).

Quote:

I appreciate being able to find codes and ideas, but having to understand logic and fix bugs is not what I desired to do.


As stated previously, there is no generic code example provviden. This was marked as the Drake CMS implementation and that is; there is no ready-to-plug solution, although I might release it in future. The article contains all the needed explanations (wording) and since I could write that in less time than a full tutorial with generic code examples, I did it (better than nothing, I thought). About bugs: it's not about fixing bugs (there are no bugs there), it's about writing your own implementation AFTER having understood how to. Copying the source code without understanding it will lead to failure simply because the examples were not meant for that.

If there are other relevant questions about implementation I will be glad to help - as soon as the Drake CMS implementation will be stable enough I will probably release it as a separate generic code example of timezones with PHP4. I hope the article will anyway help to get timezones with PHP4 (does it?)

Best regards
 
Top