Dang, I was pretty sure I tested this with different timezones. Sorry
about that!
> Does Opencast expect exactly 1970-01-01 00:00:01 in modified_date -
> or is the purpose just to set a any (arbitrary) date in the past -
> and this workaround should do the job?
The purpose is just to set an arbitrary value. So 1970-01-01 01:00:01 is
also fine. One possible option to fix the script for everyone is to use
1970-01-02 as that should be a workaround for all possible timezones.
Will see about that.
> Yes. After setting/copying modified_date from oc_search, there are
> still 671 (of 1641) series with modified_date IS NULL.
Out of interest: does that mean you have 671 series that don't have any
events? I assumed the number of empty series in real systems should be
fairly small.
Lukas
On 29.12.21 09:26, Martin Schamberger wrote:
> Hi Lars, thank you for your hints!
>
> - What happens if you just run a select statement like this: select
> TIMESTAMP '1970-01-01 00:00:01';
>
>
> Returns always 1970-01-01 00:00:01 regardless of timezone settings
> (global, session, connection).
>
> - What are your local time zone settings for your database SELECT
> @@GLOBAL.time_zone, @@SESSION.time_zone;
>
>
> Both have the value SYSTEM. According to timedatectl my timezone
> settings are: ``` Local time: Mi 2021-12-29 08:08:18 CET Universal
> time: Mi 2021-12-29 07:08:18 UTC RTC time: Mi 2021-12-29 07:08:18
> Time zone: Europe/Vienna (CET, +0100) System clock synchronized: yes
> NTP service: active RTC in local TZ: no ```
>
> - Are there actually any values to modify? select count(*) from
> oc_series where modified_date IS NULL;
>
> Yes. After setting/copying modified_date from oc_search, there are
> still 671 (of 1641) series with modified_date IS NULL.
>
> Interestingly, if setting @@GLOBAL.time_zone or @@SESSION.time_zone
> to "+00:00" before running the statement UPDATE oc_series SET
> modified_date = TIMESTAMP '1970-01-01 *00:00:01*' WHERE
> modified_date IS NULL it is executed without errors, but timestamp
> value is "1970-01-01 *01:00:01*".
>
> So when using timezone settings SYSTEM/+01:00, the statement also
> works when adding an extra hour to the timestamp value: UPDATE
> oc_series SET modified_date = TIMESTAMP '1970-01-01 01:00:01' WHERE
> modified_date IS NULL;
>
>
> Kind regards, Martin
>
> -- To unsubscribe from this group and stop receiving emails from it,
> send an email to
users+un...@opencast.org
> <mailto:
users+un...@opencast.org>.