Commit Graph

27 Commits

Author SHA1 Message Date
ralf
b01887f304 allow to use Api\DateTime::sql_filter also for non-integer columns like regular DB DateTime or Timestamp columns 2024-12-17 17:31:03 +01:00
ralf
07a0717a18 fixing the fix: whole-day fix affected adding/updating regular events (non-whole-day) via CalDAV
Adding/updating events via CalDAV with timezone different to user-timezone seems to be broken since some time before the fix :(
2024-08-06 11:59:49 +02:00
ralf
7ea6c338d3 fixing whole-day events get one day shorter when editing them in EGroupware (caused by yesterdays whole-day with timezone fix for TB) 2024-08-02 16:09:15 +02:00
ralf
43d8642347 * CalDAV: fixed all-day events from Thunderbird with timezone were one day longer
using the timezone causes all sorts of problems, therefore ignoring it now and more robust end-time calculation
2024-07-31 19:22:23 +02:00
ralf
0453aede6c * All apps/REST API: fix custom-fields of type "date-time" to be stored timezone aware, if no format is specified
So far date-time values were stored in user-time, now they are stored in UTC with a "Z" suffix" to be able to still read old user-time values unchanged.
2024-07-29 15:57:08 +02:00
ralf
be1224276b fix one problem if all recurrences of an event with explicit recurrences were overwritten/exceptions 2024-06-04 16:44:59 +02:00
ralf
83a2729cf0 another big chunk of PHP Warnings 2024-02-08 12:30:39 +02:00
ralf
3ed73db7be fix stall with no/wrong server-timezone 2023-05-17 10:08:44 +02:00
ralf
230b27bc8a fix stall, if no/wrong user timezone set in prefs 2023-05-17 10:02:49 +02:00
ralf
2f4d0cd85a fix stall when timezone in prefs is stored as empty array 2023-05-17 09:04:09 +02:00
ralf
55054024b6 fix PHP Deprecated errors visible in egroupware-docker-install.log 2023-01-26 10:42:33 +01:00
Ralf Becker
53c20ed5f7 allow to pass JSON serialized date-array with date&timezone to constructor 2021-05-14 20:24:14 +02:00
Ralf Becker
1259ae8d04 More automatic timezone handling schema for new code (hopefully not breaking existing code):
1. SO converts all timestamps to Api\DateTime objects using Api\DateTime::server2user($ts, 'object')
 - Api\Storage and Api\Storage\Base class do that automatic if using 'object' as $timestamp_type constructor parameter
 - if using just Api\Db you need to iterate over your selects manually and apply Api\DateTime::server2user($ts, 'object')
 - timestamps are store in DB in server timezone and above conversation honors that and additionally set the user TZ
2. Rest of the app should keep all timestamps as Api\DateTime objects
 - direct comparison works for Api\DateTime (and PHP \DateTime) as __toString() method automatic converts to UTC timestamps
 - do NOT convert them to timezone-less timestamps and no further timezone conversation needed for output with eTemplate
3. eTemplate2 converts automatic to user timezone for displaying dates and times
 - you need to use <date-time ... data_format="object"/> to get Api\DateTime objects back from eTemplate!
4. Api\Db converts automatic to server timezone when quoting DateTime objects for integer or timestamp columns
5. only output other then eTemplate might need to set a timezone different from the user TZ before calling $ts->format()
2021-01-26 11:16:42 +02:00
Ralf Becker
fe320938e5 document EGroupware timestamps and remove own __toString() method to be able to compare objects 2021-01-22 15:18:39 +02:00
Ralf Becker
1f7682d87a fixing two PHP Warnings 2019-06-04 09:43:59 +02:00
nathangray
9c29079ddf Silence warning about time in array format by passing it to constructor 2018-02-14 08:38:48 -07:00
nathangray
f07dbf7439 Attempt to prefer user's date format when parsing date from a string.
Should fix merging into spreadsheet problems with certain date formats (dd/mm/yyyy)
2018-02-02 11:37:30 -07:00
Ralf Becker
b9594ea357 fix typo 2017-10-31 10:49:12 +01:00
nathangray
4d6ba96115 Move commented-out DateTime tests into their own class 2017-02-06 13:08:05 -07:00
Ralf Becker
adaeabe592 fix wrong namespaced Exception: \DateTime throws \Exception 2016-09-28 11:17:19 +02:00
Ralf Becker
e34fe9a4e7 using Acl::(ADD|READ|EDIT|DELETE|PRIVAT) constants instead old EGW_ACL_* defines and fix some namespace errors found by doc/check_namespace.php 2016-05-11 19:23:14 +00:00
Ralf Becker
fc2e620652 replace old classname 2016-05-06 16:15:06 +00:00
Nathan Gray
66386c1a42 Remove 1 week limit if end date is not provided 2016-04-27 15:43:38 +00:00
Ralf Becker
77c5102792 fixed more namespace issues found by doc/check_namespace.php I wrote and forgot about it ;-) 2016-03-21 21:21:40 +00:00
Ralf Becker
8a14cd54b8 explicilty import DateInterval, so phpDoc is correct too 2016-03-21 09:45:10 +00:00
Nathan Gray
c2eaabaa5b Fix namespace error 2016-03-18 15:37:57 +00:00
Ralf Becker
a24c1121a2 move egw_time class to Api\DateTime 2016-03-05 11:14:01 +00:00