byalextran / DnsMadeEasy

PHP wrapper for the Dns Made Easy API.
19 stars 10 forks source link

avoid using date_default_timezone_set('UTC') #3

Closed redemption closed 12 years ago

redemption commented 12 years ago

Hi there,

I noticed that in your Base.php class you use date_default_timezone_set()

https://github.com/a1extran/DnsMadeEasy/blob/master/Base.php#L20

It looks like you do that in order to get UTC time here:

https://github.com/a1extran/DnsMadeEasy/blob/master/Base.php#L100

Do you think you would get the same results, if you removed date_default_timezone_set() and then use gmdate('r') instead of date('r')?

I think changing the default_timezone can clobber date functions that are run after instantiation of the DnsMadeEasy class

byalextran commented 12 years ago

Yikes! By golly, I believe you're right. gmdate('r') should work and not cause any issue.

Good catch and thanks for pointing it out to me!

redemption commented 12 years ago

Thanks for the quick response btw :)