Closed payeh closed 1 year ago
check #133
Does not work.
Hello sir, How Can Change xmplus Date to IRR format ? Have you a solution ?
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.
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'
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'
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 URLhttps://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, یکشنبه",
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' 👍💕