1
0
mirror of https://github.com/tateisu/SubwayTooter synced 2025-02-09 16:48:47 +01:00

fix #163, (Mastodon)予約投稿時のscheduled_atの指定にZ(UTC)をつける

This commit is contained in:
tateisu 2021-08-24 08:03:03 +09:00
parent 2785d66cb1
commit a95c24e841

View File

@ -447,13 +447,14 @@ class PostImpl(
c.timeInMillis = scheduledAt c.timeInMillis = scheduledAt
val sv = String.format( val sv = String.format(
Locale.JAPANESE, Locale.JAPANESE,
"%d-%02d-%02d %02d:%02d:%02d", "%d-%02d-%02dT%02d:%02d:%02d.%03dZ",
c.get(Calendar.YEAR), c.get(Calendar.YEAR),
c.get(Calendar.MONTH) + 1, c.get(Calendar.MONTH) + 1,
c.get(Calendar.DAY_OF_MONTH), c.get(Calendar.DAY_OF_MONTH),
c.get(Calendar.HOUR_OF_DAY), c.get(Calendar.HOUR_OF_DAY),
c.get(Calendar.MINUTE), c.get(Calendar.MINUTE),
c.get(Calendar.SECOND) c.get(Calendar.SECOND),
c.get(Calendar.MILLISECOND)
) )
json["scheduled_at"] = sv json["scheduled_at"] = sv
} }