Jump to content

timestamp based on day/week/month


chaking

Recommended Posts

I'm working on daylight savings time around the world and the database I'm drawing the information from lists the start of daylight savings time with the month, day, week, hour, minute and second it starts.

 

Initially I thought I could throw that information into mktime() and get the timestamp, however once I started doing it I realized the `week` part screws it all up.

 

mktime is setup as mktime (hour, minute, seconds, month, day, year)

 

So you can't add in the week of the month.  So if I have the following information, anyone know how I can get a timestamp?:

 

Month: 11

Day: 0

Week: 1

Hour: 2

Minute: 0

Seconds: 0

Link to comment
Share on other sites

hmm... good idea, however I don't know if that would work... e.g. take this record:

 

Month: 3

Day: 0

Week: 5

 

Timezone: Azores Daylight Savings Time

 

I believe this references the last sunday in March... if we were to do (5*7)+0 = 35th day of March?

 

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.