Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: [Solved]: ecard timezone way off  (Read 6800 times)

0 Members and 1 Guest are viewing this topic.

natrlhy

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 77
[Solved]: ecard timezone way off
« on: July 24, 2004, 02:36:10 am »

When I send an ecard, it says I sent an ecard on "Saturday, July,30,2004 12:31 AM [GMT]" when i really sent it today, July 23, 2004 5:31 PM [PDT]

Is there a way to change this to be accurate?

Thanks!
« Last Edit: July 28, 2004, 08:26:12 am by GauGau »
Logged

kegobeer

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 4637
  • Beer - it does a body good!
    • The Kazebeer Family Website
Re: ecard timezone way off
« Reply #1 on: July 24, 2004, 07:36:32 am »

The next version will include the ability to set the local timezone.  You can hard code it, but I'd just wait.  And technically, the time is accurate.  GMT-7 = PDT.   ;)
Logged
Do not send me a private message unless I ask for one.  Make your post public so everyone can benefit.

There are no stupid questions
But there are a LOT of inquisitive idiots

natrlhy

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 77
Re: ecard timezone way off
« Reply #2 on: July 24, 2004, 10:47:18 am »

Can't wait for the next release ;)

But GMT-7? That's minus 7 hours, not days too is it? I sent it on the 23rd (5:31PM PST), the ecard said the 30th (12:31AM GMT)  ???  :)
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: ecard timezone way off
« Reply #3 on: July 24, 2004, 01:01:25 pm »

check your server clock.

GauGau
Logged

natrlhy

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 77
Re: ecard timezone way off
« Reply #4 on: July 24, 2004, 11:23:51 pm »

Server is set correctly...
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: ecard timezone way off
« Reply #5 on: July 25, 2004, 08:21:31 pm »

I have no clue why this happens then, sorry. Anyone else?

GauGau
Logged

kegobeer

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 4637
  • Beer - it does a body good!
    • The Kazebeer Family Website
Re: ecard timezone way off
« Reply #6 on: July 25, 2004, 08:25:50 pm »

Post a link to your site - I'd like to send an ecard and see what time shows up.  Please create a normal user account and post the login/pass here.

Also, are you sending email via php or smtp?  The mail server's time could be off.
Logged
Do not send me a private message unless I ask for one.  Make your post public so everyone can benefit.

There are no stupid questions
But there are a LOT of inquisitive idiots

natrlhy

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 77
Re: ecard timezone way off
« Reply #7 on: July 27, 2004, 07:05:12 pm »

I modified the mailer.inc.php file to point to the server I wanted mail routed through. The server time on that mail server is correct.
Please let me know when I can delete the account.
Thanks for looking into this!
« Last Edit: July 28, 2004, 01:23:32 am by natrlhy »
Logged

Nibbler

  • Guest
Re: ecard timezone way off
« Reply #8 on: July 27, 2004, 11:44:56 pm »

I can see what is wrong - the date stamp is using %V, which is the week number of the year eg 1 to 53. Change it to %d.


[fixed in stable (ecard.php v1.9), devel will use GMT offset so not affected by this]
« Last Edit: July 28, 2004, 01:18:40 am by Nibbler »
Logged

natrlhy

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 77
Re: ecard timezone way off
« Reply #9 on: July 28, 2004, 01:23:17 am »

Thats much better!

Sent by natrlhy from IP x.x.x.x at Tuesday, July,27,2004 11:17 PM [GMT]

Now just awaiting the next release to change the timezone.
Thanks! I have delete the test account.

For reference, I modified this line in the ecard.php file:

$message .= "Sent by $sender_name from IP {$_SERVER['REMOTE_ADDR']} at ".gmstrftime("%A,  %B,%d,%Y %I:%M %p ", time())." [GMT]";
                                                                                                                                                    |
                                                                                                                                                    this was %V
Logged
Pages: [1]   Go Up
 

Page created in 0.032 seconds with 15 queries.