Comments (14)
The issue is caused by the following:
We click on the calendar (at some date/time). Fullcalendar.js generates an event, and creates a Date object with the correct values. Those values are in the timezone of the BROWSER.
So if you click on 10 oct in monthview, you will have '10 Oct 2012 - 00:00 GMT+02' (thats when browser is in GMT+02).
Now the Date object is converted into a Unix timestamp (which is always UTC), and this is passed to the new.form.php ajax script.
Here we convert the timestamp into a PHP DateTime object, and convert it to the timezone set in ownCloud.
Ofcourse, if this is different then the browser timezone, you will receive weird values.
I think this can be solved by letting the calendar.js pass the Date '10-10-2012T00:00:00' instead of a unix timestamp.
In the PHP code we can then create a new DateTime object from format. This should work correct if browser and ownCloud have different timezone settings.
@georgehrke What do you think? I can fix the patch for this.
from apps.
No matter how often date time info is converted (from "Wed Oct 10 2012 00:00:00 GMT+0200" to unix timestamp "1349820000" to some timezone set on the server "Tue, 09 Oct 2012 22:00:00 GMT"), the information specifies one particular point in time. Nothing wrong with this.
If you start to cut off the timezone info, things will start to become weird. The information will no longer specify a particular point in time, but a point in time in the current timzone. Whatever timezone this may be. What timezone will be used by owncloud if the user didn't specify one? The server's timezone? What server? Aren't we in a cloud?
from apps.
Ok i understand we have to make a choice.... maybe we have to take Oc timezone and warn the user if the browser and oc timezone are differents ....
but it's really disturbing to click on 10:00 on the Cal and receive a form with 8:00 ...
from apps.
It's already part of my calendar roadmap for ownCloud5. I will add a js that gets the timezone and send it together with the time to the server.
from apps.
In general time zone should only matter on the presentation layer and it's a user setting (either implicit or explicit).
Within the data model a time stamp should be stored time zone neutral - using UTC in general would be a good strategy.
Generally speaking: we should not care where the server is located - and to some extend we should make no assumptions on where the client (browser/mobile device) are located.
from apps.
That's exactly the way I want to implement it :)
from apps.
Excellent!
It was not clear from your previous message. (Or did I miss anything anywhere?)
THX
from apps.
No, you didn't miss something :)
from apps.
I agree, it's a representational matter. But currently, there are still two sources of information: The timezone information stored in the user's profile server side, and the timezone information you can get from the user's browser. Which one are going to use?
from apps.
I'd suggest to use the client's (browser/mobile device/PIM) time zone.
Do we need to store the time zone in the user profile for any reason?
from apps.
As I already wrote ;) - I am going to use jstz to get the timezone set in the browser
from apps.
What about caldav?
Do you need to care of this as well or will the clients take care? - just asking ....
from apps.
Should be the responsibility of the client. At least as long as the caldav dates contain tz information (I'd stick with UTC for caldav).
User profile tz information seems to become obsolete... Can't think of a use case for it.
from apps.
So, @georgehrke I suppose this is fixed? Closing this, please reopen if itβs not fixed yet.
from apps.
Related Issues (20)
- External storage, google drive broken *update* Readme if not connecting. HOT 2
- Segate Personal Storage Cloud (arm7) update fault HOT 1
- the OS X calendar caldav connection to owncloud 9.1.1 is broken. HOT 1
- Move bundled apps to separate repo HOT 1
- Delete files_videoviewer since files_videoplayer is not bundled? HOT 3
- Login failed despite correct credentials HOT 6
- Access class methods of other apps HOT 2
- Bad UX creating a tag in the admin/additonal menu HOT 1
- External Sites public, viewable on shared folders HOT 2
- Stop using private OC_Group class
- user_external with imap: too many connections to the server HOT 7
- calendar app Certificate has been revoked HOT 1
- saml HOT 1
- Zyxel Owncloud deletes files after uninstalling !!! HOT 2
- [user_external] imap: username and [email protected] are treated as different users HOT 2
- owncloud folder erased if you run device maintenance HOT 1
- [external]: using custom icons makes ownCloud not available after upgrading to 10.0.3 HOT 7
- user_external: disabling logins with '@' does not work any more
- Move user_external and external to separate repos HOT 8
- Stop using $CLASSPATH
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from apps.