Jump to content

Set inventory item time by referencing storefront time


ndjustin20

Recommended Posts

Greetings!

 

I was wondering if someone would either know or might be able to point me in the right direction.  I have scoured the internet, and this site, and can't seem to find any examples of setting the time for an inventoried item against the time of the storefront.  Here is my problem:  I currently can set a storefront to have a time based on where the storefront is located which is cross referenced by time zones ie. eastern, central, ect.  What I would like to do now is do the same thing with my inventory so say I have a bicycle listed and want it only to be available for purchase from 12 noon  until 3pm so it will start to be shown at 12 noon and stop being shown at 3pm.  How would I achieve this by referencing the storefront time and not the server time as this wouldn't accurately reflect the storefront time ie. plus or minus server time depending on time zone loacation?

 

Any recommendations at all are greatly appreciated.

 

 

Justin

Link to comment
Share on other sites

It might make more sense to set the server inventory based on GMT so you do not need to care where your server is located (or moved).  Then pass a GMT offset with the 12noon and 3pm that varies with the store time zone to use in server queries.

Link to comment
Share on other sites

I'll give that a try....so by doing so I would use the off set instead of plus or minus the central time zone....guess I didn't think of that....so I wouldn't be creating an item referencing the storefront time though instead reference the GMT and use that to create the time for the item ie start and stop times....that seems like it would work....No more double post'in for me....wasn't sure which area to post in...sorry!  :)

Link to comment
Share on other sites

So do those functions compare the server time or GMT though because I am running into serious problems using server time comparisons.

They are stored in time-zone-independent format (call it GMT)... but only if you stored them properly.

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.