xcode75 / XManagerPlus

An Xray Manager
https://xcode75.github.io/XMPlusDocs/
264 stars 48 forks source link

IRR Date Problem #137

Closed payeh closed 1 year ago

payeh commented 1 year ago

XMPlus Using php time zone will cause a difference of one hour You can check the exact time of Iran at : time.ir

The only local time that is accurate for Iran at the moment is: 'https://timeapi.io/api/TimeZone/zone?timeZone=Asia/Tehran' image

Iranian date is jalali, it is recommended to use jalali date for iRR user jalali calendar [persian calendar] for iRR :

Convert date to jalali

'https://api.ineo-team.ir/DateConvert.php?method=miladi&day=3&month=4&year=2023' image

or

Curl curl -X 'POST' \ 'https://timeapi.io/api/Conversion/Translate' \ -H 'accept: application/json' \ -H 'Content-Type: text/json' \ -d '{ "dateTime": "2021-03-14 17:45:00", "languageCode": "fa" }' Request URL https://timeapi.io/api/Conversion/Translate Response body { "dateTime": "2021-03-14 17:45:00", "languageCode": "fa", "friendlyDateTime": "1399 اسفند 24, یکشنبه 17:45:00", "friendlyDate": "1399 اسفند 24, یکشنبه", "friendlyTime": "17:45:00" } persian date "friendlyDate": "1399 اسفند 24, یکشنبه", image image

or https://raw.githubusercontent.com/sallar/jDateTime/master/jdatetime.class.php <?php require_once('JalaliJSC/jdatetime.class.php'); $date = new jDateTime(); echo $date->date("Y/m/d", strtotime("2023-04-03")); ?> or use github doc:

'https://github.com/fingerpich/jalali-moment' 👍💕

xcode75 commented 1 year ago

check https://github.com/xcode75/XManagerPlus/issues/133

matador7495 commented 1 year ago

check #133

Does not work.

Dev-l0p commented 1 year ago

Hello sir, How Can Change xmplus Date to IRR format ? Have you a solution ?

xcode75 commented 1 year ago

Date is correct as i have shown you. Nothing can be done about it. The time is meant to help reset and check if a plan is expired has nothing to do with any country.