[Skip to main content](#vessel-content)

#   hikashop\_getTime() uses today's UTC offset, so datepicker fields show the previo

##

- **[Genr8r](/forum/user/44235-genr8r "View Genr8r's Profile")**
- [![Genr8r's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/44235-genr8r "View Genr8r's Profile") Topic Author
- [ Offline](/forum/user/44235-genr8r)

Less More

- Posts: 42
- Thank you received: 4
-
-

2 hours 22 minutes ago -  2 hours 21 minutes ago [\#100000417](#100000417) by [Genr8r](/forum/user/44235-genr8r "View Genr8r's Profile")  *[hikashop\_getTime() uses today's UTC offset, so datepicker fields show the previo](/forum/35-orders-management/100000082-hikashop-gettime-uses-todays-utc-offset-so-datepicker-fields-show-the-previo#100000417 "hikashop&#95;getTime() uses today's UTC offset, so datepicker fields show the previous day across a DST change  HikaShop 6.7.1 (same code in 6.6.0), Joomla site timezone America/Los&#95;Angeles, server PHP timezone UTC.  A datepicker custom field stores 20261125000000. In the backend order view and edit form it displays as 11/24/2026. Dates before the DST change display correctly.  Cause: datepickerfield getTimestamp() passes &quot;2026/11/25&quot; to hikashop&#95;getTime(). That falls back to strtotime() and then applies  , where $timeoffset is computed once from Factory::getDate('now', $timeZone). Today that is UTC-7 (PDT), but 11/25 is in PST, which is UTC-8, so the result is 11/24 23:00 local.  The plugin's &quot;Set hour to noon&quot; option hides the display problem but moves the forbidden-weekday check in check() by a day (a Saturday is rejected as Sunday), so it is not a workaround for us.  Suggested fix: compute the offset for the date being converted, e.g. new DateTime($date, new DateTimeZone($timeZone)) then getTimestamp(), instead of the cached &quot;now&quot; offset.")* was created by *[Genr8r](/forum/user/44235-genr8r "View Genr8r's Profile")*

**hikashop\_getTime() uses today's UTC offset, so datepicker fields show the previous day across a DST change**

HikaShop 6.7.1 (same code in 6.6.0), Joomla site timezone America/Los_Angeles, server PHP timezone UTC.

A datepicker custom field stores 20261125000000. In the backend order view and edit form it displays as 11/24/2026. Dates before the DST change display correctly.

Cause: datepickerfield getTimestamp() passes "2026/11/25" to hikashop_getTime(). That falls back to strtotime() and then applies Code:

$date - $timeoffset*60*60 + date('Z', $date)

, where $timeoffset is computed once from Factory::getDate('now', $timeZone). Today that is UTC-7 (PDT), but 11/25 is in PST, which is UTC-8, so the result is 11/24 23:00 local.

The plugin's "Set hour to noon" option hides the display problem but moves the forbidden-weekday check in check() by a day (a Saturday is rejected as Sunday), so it is not a workaround for us.

Suggested fix: compute the offset for the date being converted, e.g. new DateTime($date, new DateTimeZone($timeZone)) then getTimestamp(), instead of the cached "now" offset.

Last edit: 2 hours 21 minutes ago by [Genr8r](/forum/user/44235-genr8r "View Genr8r's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzM1LW9yZGVycy1tYW5hZ2VtZW50LzEwMDAwMDA4Mi1oaWthc2hvcC1nZXR0aW1lLXVzZXMtdG9kYXlzLXV0Yy1vZmZzZXQtc28tZGF0ZXBpY2tlci1maWVsZHMtc2hvdy10aGUtcHJldmlvP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop- Install &amp; Update- Product &amp; Category Display- Content Creation- Sales and Orders- - Orders management- - Reports &amp; Statistics- Customers- Checkout- Payment Methods- Shipping Methods- Import &amp; Export (CSV, XLS…)- Specific Features- - Affilation- - Taxes- - Wishlist- - Vote- - Carousel &amp; Slider- - Mass Actions- - Filters &amp; Search- - Discount &amp; Coupon- - Feature Request- Integrations- Showcase- General Talk about HikaShop- Development- - HikaShop 3.0 Beta- Translation- Commercial Jobs HikaShop Components- HikaMarket- - Market: Feature requests- - Market: How to?- - Market: Bug Report- HikaSerial- - General talk about HikaSerial- - Serial: Bug Report- - Serial: How to?- - Support en Français de HikaSerial (French Support)- - HikaSubscription- HikaAuction- - Auction: Feature requests- - Auction: How to?- - Auction: Bug report Hikashop around the world- Support en Français (French Support)- Russian- - FAQ. Курс выживания с Hikashop. Частые вопросы и о- - Расширения Hikashop- - Наши сайты на Hikashop- 日本語版サポート(Japanese Support)- Thai- German Archives- Bug Report- How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.101 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)

[](#top)
