Input parameter : PersianCal year:1397, , month:1, day:1, hour 21: minute 13
var d = new Date(date ? date.getTimeExtended() + offset: undefined);
new Date(date ? date.getTimeExtended() + offset : undefined);
Thu Mar 22 2018 01:43:17 GMT+0430 ()
More Test on Linux
Set time zone for Asia/Iran following steps:
Check current timezone info ls -al /etc/localtime
Changed timezone: sudo ln -sf /usr/share/zoneinfo/Asia/Tehran /etrdate -s timebora.netc/localtime
Update time :rdate -s timebora.net
Check a time with date command
(화) 05:39:02 +0430 <-- Confirmed It's in Iran Timezone.
[Info]
Tested in Persian Calendar with Asia/Tehran
Test time (Gregorian year 2018, month: 3, day:21) --> It's converted to Persian Date:year:1397, month:1, day: 1)
DST time peride offset value: 0.1875
Not DST time offset value: 0.1458333333
Issue:
If Persian date (year: 1397, month: 1: day,1) It returns, 0.1875 in https://github.com/iLib-js/iLib/blob/development/js/lib/PersianDate.js#L229 line. It should be 0.145833333 That day not in DST time. But iLib says it's in DST time.
Input value is Persian datetime, https://github.com/iLib-js/iLib/blob/development/js/lib/TimeZone.js#L811 value is a bit weird.
More Test on Linux Set time zone for Asia/Iran following steps:
ls -al /etc/localtime
Changed timezone:sudo ln -sf /usr/share/zoneinfo/Asia/Tehran /etrdate -s timebora.netc/localtime
Update time :rdate -s timebora.net
Check a time withdate
command