It looks like the Podio API is pretty smart and knows my timezone.
.
DateTime 14:15:00 .
content = {'date' => {'start' => '2016-10-21 14:15:00'}}
Podio.client.authenticate_with_credentials(<user A>, <pass>)
item_created_by_userA = Podio::Item.create(app_id, 'fields' => content)
Podio.client.authenticate_with_credentials(<user B>, <pass>)
item_created_by_userB = Podio::Item.create(app_id, 'fields' => content)
Podio.client.authenticate_with_app(<app ID>, <app token>)
item_created_by_app = Podio::Item.create(app_id, 'fields' => content)
:
item_created_by_userA:
'start' => 2016-10-21 14:15:00
'start_utc' => 2016-10-21 12:15:00
item_created_by_userB:
'start' => 2016-10-21 14:15:00
'start_utc' => 2016-10-21 21:15:00
item_created_by_app:
'start' => 2016-10-21 14:15:00
'start_utc' => 2016-10-21 14:15:00
2016-10-21 14:15:00 API 2016-10-21 14:15:00 +0200, userA UTC + 02, API 2016-10-21 14:15:00 -0700, userB UTC-07 ( Podio, ). , UTC
, 2016-10-21 14:15:00 +0800 ( , -), ( Podio) API Podio, :
date_as_str = "2016-10-22 14:15:00 +08:00"
date_with_tz = DateTime.parse(date_as_str).in_time_zone("Europe/Copenhagen")
date_to_send = date_with_tz.strftime('%Y-%m-%d %H:%M:%S')
content = {'date' => {'start' => date_to_send}}
Podio.client.authenticate_with_credentials(<user A>, <pass>)
item_created_by_userA = Podio::Item.create(app_id, 'fields' => content)