yDelouis / selfoss-android

Android application for Selfoss
MIT License
41 stars 9 forks source link

Timezone issue #40

Open jbfavre opened 9 years ago

jbfavre commented 9 years ago

Hello, Selfoss-android displays articles with wrong hour. I guess it's somewhat related to timezones.

You'll find 2 screenshots, first from selfoss-web interface, second from android. Web interface displays coherents hours when selfoss-android seems to consider hours as UTC.

selfoss-android-hour-bug selfoss-web-hour-bug

yDelouis commented 9 years ago

You're right, I expect articles date to be in UTC timezone. It works for my instance so I guessed Selfoss server was returning dates in this timezone. Do you know in which timezone the server considers dates ? Does it depend on the timezone of the server ?

jbfavre commented 9 years ago

Give the database items table structure (no timezone given), I would say it depends on server timezone and/or on PHP date.timezone config param

yDelouis commented 9 years ago

So there is no way for the app to know which timezone to expect... Any idea about how to solve this issue (except by asking the user in the settings) ?

yDelouis commented 9 years ago

Maybe we should change the server-side code to return only UTC dates ? What do you think ?

jbfavre commented 9 years ago

I would like to say yes, but I have no decision in it. More, this will require an content update script to convert each and every datetime in selfoss from server/PHP timezone to UTC. Maybe @SSilence could give his advice on it ?