After 2.6.2 update, Available From/To time problem

  • Posts: 48
  • Thank you received: 1
9 years 1 month ago #236937

-- HikaShop version -- : 2.6.2
-- Joomla version -- : 3.5.1

Hello Hikashop!

We upgraded to 2.6.2, and run into an odd problem. Every time we save an item with the Available From and Available To fields set, the hour increments by 1!

I've attached two screenshots showing a before save and after save behavior.

We haven't changed anything else other than the upgrade recently. Any ideas?




Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 83831
  • Thank you received: 13572
  • MODERATOR
9 years 1 month ago #236977

Hi,

We don't have the problem on our end.
It must be related to the timzone of your Joomla configuration, or your backend user account, or of your web server which isn't set properly. Please check them.

Please Log in or Create an account to join the conversation.

  • Posts: 48
  • Thank you received: 1
9 years 1 month ago #237045

nicolas wrote: Hi,

We don't have the problem on our end.
It must be related to the timzone of your Joomla configuration, or your backend user account, or of your web server which isn't set properly. Please check them.


The Timezone for PHP, the server, Joomla, and the webserver user are universally set to America/Los_Angeles.

A little more info:

If I set JUST a "Available To" date and time, this does not happen.

When I set both Available From and Available To, the Hour for both increments by 1 on every save.

This didn't happen prior to upgrading to 2.6.2.

Please Log in or Create an account to join the conversation.

  • Posts: 83831
  • Thank you received: 13572
  • MODERATOR
9 years 1 month ago #237052

Hi,

I did try with both and didn't had the problem.
Could it be that you have some kind of mass actions enabled that would be triggered when the product is saved ?
Please check that via the menu System>Mass actions.

Please Log in or Create an account to join the conversation.

  • Posts: 48
  • Thank you received: 1
9 years 1 month ago #237064

nicolas wrote: Hi,

I did try with both and didn't had the problem.
Could it be that you have some kind of mass actions enabled that would be triggered when the product is saved ?
Please check that via the menu System>Mass actions.


The only published mass action we have is to force a taxability code in specific categories. I tried disabling it but it didn't have any effect on this behavior.

Please Log in or Create an account to join the conversation.

  • Posts: 83831
  • Thank you received: 13572
  • MODERATOR
9 years 1 month ago #237142

Hi,

I really don't see what it could be.
And you say that you have the problem only if you set both "from" and "to" dates ? If you set only the "from" or only the "to" you don't have the problem ?
I don't have any other ideas besides a mass action or a custom plugin.
If it was a timezone issue with the code of HikaShop, it should happen regardless of whether you would enter one or the other.

Please Log in or Create an account to join the conversation.

  • Posts: 48
  • Thank you received: 1
9 years 1 month ago #237251

nicolas wrote: Hi,

I really don't see what it could be.
And you say that you have the problem only if you set both "from" and "to" dates ? If you set only the "from" or only the "to" you don't have the problem ?
I don't have any other ideas besides a mass action or a custom plugin.
If it was a timezone issue with the code of HikaShop, it should happen regardless of whether you would enter one or the other.


I agree, this is weird. It FEEL like a daylight savings time issue, but it only happens if both are set. For now, that's our workaround.

Could you point me at (roughly) where the localtime to unixtime conversion for product edit happens in the codebase? Would like to throw some debugging hooks in there to see if I can sort out what's going on.

Please Log in or Create an account to join the conversation.

  • Posts: 83831
  • Thank you received: 13572
  • MODERATOR
9 years 1 month ago #237261

Hi,

You want to check the functions hikashop_getDate and hikashop_getTime of the file administrator/components/com_hikashop/helpers/helper.php
One is used to convert the date you enter in the field into a unix timestamp in order to store it and the other is used to convert a stored unix timestamp into a date that will be display in the field.

Please Log in or Create an account to join the conversation.

Time to create page: 0.081 seconds
Powered by Kunena Forum