Hi there,
I am facing some strange date offset on DateRangePicker for my local time zone (Europe/Sarajevo). What does happen for me and with example below is that default date is changing in the middle of the morning. For example, at 08:00 AM shows date 2021-02-15 (date from yesterday) and at 09:00 AM switch to 2021-02-16 (actual date). I believe that there is default time zone set to different region. If I print date('now') with PHP, it shows correct time for Sarajevo.
I did check DateRangePicker.php library and on the line 144: "locale"=>$this->locale, defines locale. But I did not find where is default value. I am not sure if "locale"=>"bs", is correct way for setting it.
Sample code:
<?php
DateRangePicker::create(array(
"name"=>"dateRange",
"language"=>"hr",
"locale"=>"bs",
"format"=>"YYYY-MM-DD",
"ranges"=>array(
"Danas"=>DateRangePicker::today(),
"Jučer"=>DateRangePicker::yesterday(),
"Zadnjih 7 dana"=>DateRangePicker::last7days(),
"Zadnjih 30 dana"=>DateRangePicker::last30days(),
"Ovaj mjesec"=>DateRangePicker::thisMonth(),
"Prošli mjesec"=>DateRangePicker::lastMonth(),
),
))
?>
Can someone help me with this?
Thx