4

I'm using Services Views to create a JSON output of my Drupal site's nodes. These nodes has a start and stop date and time regarding an event. On the site, viewing the node, the time is correct, but in my Services view it is shown in UTC instead of my Drupal site's timezone (UTC +2).

I've seen other questions regarding this issue with a DB and site timezone being different, with all the issues it creates - especially in cases just like this. Eg.: http://dropbucket.org/node/559 and Drupal timezone and database and Printing the correct date value in a view

In this case, however, I do have a problem converting the value into the correct timezone and therefore the correct time.

I have the site set to UTC +2 (Sweden/Stockholm), users arn't allowed to have any other timezones, also the date field is set to save the date in the site's timezone, not the DB.

My view wont let me rewrite my output so I can't convert the date inside the view - nor would I like to run PHP in a view anyway.

Is there another way of converting, or at least changing the setting for the date save, so that this won't be a problem?

Cheers, Daniel

1 Answer 1

0

I'm not exactly sure why you are having this trouble... Though in a quick attempt to test (in Drupal 7), it does seem a little screwy.

However, since you don't seem worried about other timezones and no need to convert timezones, it would seem easiest to set the "Time zone handling" on the field to "no time zone conversion" Then the views should pick up whatever date and time is there to begin with.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.