简体   繁体   中英

How to set timezone for Twilio SMS?

I want to set the timezone when sending SMS by Twilio API.

I sent an SMS via API referring to the Twilio documentation.
It worked as expected except for one point.
When an SMS is received by a mobile phone, the time is displayed in GMT.
But I want to change the time display to local time. (I am in Japan and want to deliver SMS to Japanese people.)
I looked into the API documentation but couldn't find the item.
I hope I can get advice.


The following is an additional note.

An email has a time stamp in its "Date" header which can include time zone information.
When I received an SMS from twilio on my feature phone, I saw that the message timestamp was displayed as GMT instead of local time, and thought it was because the time zone was handled incorrectly.

I rearrange this issue.

I have two mobile phone,
one is a feature phone and the other is a smartphone (android).
They are contracted in Japan.
The phone number purchased through Twilio is in the US.

I sent SMS between these two phones and twilio to see how the timestamp of the received SMS is displayed.

0: sender -> recipient / delivery time -> time displayed on the receiving side  

1: feature phone (JP) -> smartphone (JP)    / 21:00 JST -> 21:00  
2: smartphone (JP)    -> feature phone (JP) / 21:00 JST -> 21:00  
3: twilio (US)        -> smartphone (JP)    / 21:00 JST -> 21:00  

They are OK. But...

4: twilio (US)        -> feature phone (JP)  / 21:00 JST -> 12:00  

...this is not a favorable result.

I'm not sure what the difference between 3 and 4 is.
due to the function of the mobile phone?
due to processing by the SMS gateway?

After that I tried several models of other feature phones and confirmed that they all had the same result.
This is a feature limitation of feature phones unique to Japan and may not be solved.

I'm imagining you're sending to an Android phone. Can you perhaps send a screenshot?

While the sending timestamp is included with the SMS metadata, it is common practice for this kinds of information to be sent in a universal time format (UTC, GMT, etc.), and to leave it to the app developer to correctly interpret and display the time appropriately to the user.

You, as the message sender, should not be keeping track of what timezone your users are in - that is the job of the local device they are using :-)

Your question is a little unclear. Do you mean change the timezone reflected in your Twilio Console to view the SMS logs? If you look under your user settings in console, you can change the timezone reflected in console.

Change the timezone in your Twilio project

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM