Hello! I'm using Seblod 3.1.5 with Joomla 2.5.14 and have problems with calendar plugin. Apparently it uses UTC instead of local time, which causes 2 hours difference while creating new content. In old Seblod Forum I found 'corrected' calendar.php file, which worked great and doesn't terrorize me with that UTC.
However, it's for Seblod 2.x and doesn't work quite good in Seblod 3.x. I mean - it pastes correct time while creating new content, but completely fails when I try to use it in my Search type (the search type ignores all my date filters based on calendar).
So... is there any chance to add option to choose UTC/local time in calendar plugin? Or maybe would someone be so kind and change it in calendar.php from UTC to local time, as I'm not a PHP master and can't do it myself? I bet there are / will be more people with this issue.
Well, AGAIN nobody here cared to help (well, it's the fifth or sixth time I ask anything - never got any answer), but somehow I got to find a workaround for this issue (because for me basing on UTC is an issue). I just looked closely at the modified calendar.php for Seblod 2.x and transfered all the changes from there to calendar.php in my Seblod 3.1.5 - tadaa, it's working as it should. I don't enclose this file, as I'm not author of the original additional lines. But if you really want it, I can still send it to you directly.
And again - for me the case is not solved, as I'd have to overwrite the file manually after every Seblod update.
For everybody thinking I'm a total noob who doesn't know that putting 'now' as default value in calendar plug-in is the ultimate solution: well... no. It's ok when you're creating new article, but when you edit native joomla article to convert it this way into Seblod article - well, here we go, the dates 'created' and 'publish up' go back 2 hours. When you had by default set time to 00:00:00, Seblod changes it 22:00:00 - the previous day. And of course all searching by date starts to mess.
Well, I can't code, I don't know PHP, but managed to merge custom code from SEBLOD 2 into SEBLOD 3 calendar plugin and - guess what - it works as it should. I am NOT author of the custom snippets inserted into this php file, I'm just enclosing this attachment to make your life easier. Unpack ZIP and overwrite the calendar.php in your Joomla directory. Oh, and also have in mind that every new update will restore the unmodified version of the file...
Thanks Olek and Klas. Your code work like a charm. Very usefull to keep joomla manage the time. I hope the seblod team upgrate their field calendar with this kind of function. A select button on calendar configuration with two options (Offset Joomla Time - Local Time) shoul be very nice!