I try to add the Date and time in Zoho CRM but it not added because the format of date-time is not correct. So used the below code and try to push with API PUSH. It also works when you push the perfect date in MySQL and show date time in a nice format in HTML Output.
Used below code for entry perfect date time with timezone in CRM, MySQL or HTML.
Can change timezone PHP variable as you required, timezone table are below mention after code.
$timezone = 'GMT'; $datetime = new DateTime($start, new DateTimeZone($timezone)); $date1 = $datetime->format('Y/m/d h:i a'); $timestamp= strtotime($date1); $start_date = date('c', $timestamp);
The output of the above code :
Dec 23, 2020 07:35 PM
Different Time Zone:
UTC | Location | Time Zone |
---|---|---|
UTC -1 | Cabo Verde and 2 more | CVT |
UTC -2 | Pernambuco/Brazil and South Georgia/Sandwich Is. | GST |
UTC -3 | most of Brazil, Argentina and 9 more | ART |
UTC +14 | Samoa and Christmas Island/Kiribati | LINT |
UTC +13:45 | Chatham Islands/New Zealand | CHADT |
UTC +13 | New Zealand with exceptions and 5 more | NZDT |
UTC +12 | small region of Russia and 7 more | ANAT |
UTC +11 | much of Australia and 7 more | AEDT |
UTC +10:30 | small region of Australia | ACDT |
UTC +10 | Queensland/Australia and 6 more | AEST |
UTC +9:30 | Northern Territory/Australia | ACST |
UTC +9 | Japan, South Korea and 5 more | JST |
UTC +8:45 | Western Australia/Australia | ACWST |
UTC +8 | China, Philippines and 10 more | CST |
UTC +7 | much of Indonesia, Thailand and 7 more | WIB |
UTC +6:30 | Myanmar and Cocos Islands | MMT |
UTC +6 | Bangladesh and 6 more | BST |
UTC +5:45 | Nepal | NPT |
UTC +5:30 | India and Sri Lanka | IST |
UTC +5 | Pakistan and 8 more | UZT |
UTC +4:30 | Afghanistan | AFT |
UTC +4 | Azerbaijan and 8 more | GST |
UTC +3:30 | Iran | IRST |
UTC +3 | Moscow/Russia and 22 more | MSK |
UTC +2 | Greece and 31 more | EET |
UTC +1 | Germany and 45 more | CET |
UTC +0 | United Kingdom and 24 more | GMT |
UTC -3:30 | Newfoundland and Labrador/Canada | NST |
UTC -4 | some regions of Canada and 28 more | VET |
UTC -5 | regions of USA and 14 more | EST |
UTC -6 | regions of USA and 9 more | CST |
UTC -7 | some regions of USA and 2 more | MST |
UTC -8 | regions of USA and 4 more | PST |
UTC -9 | Alaska/USA and regions of French Polynesia | AKST |
UTC -9:30 | Marquesas Islands/French Polynesia | MART |
UTC -10 | small region of USA and 2 more | HST |
UTC -11 | American Samoa and 2 more | NUT |
UTC -12 | much of US Minor Outlying Islands | AoE |