{"action":"created","issue":{"url":"https://api.github.com/repos/openhab/openhab/issues/3311","labels_url":"https://api.github.com/repos/openhab/openhab/issues/3311/labels{/name}","comments_url":"https://api.github.com/repos/openhab/openhab/issues/3311/comments","events_url":"https://api.github.com/repos/openhab/openhab/issues/3311/events","html_url":"https://github.com/openhab/openhab/issues/3311","id":111988705,"number":3311,"title":"Wrong time at rules by using now.getHourOfDay","user":{"login":"swell-d","id":8986006,"avatar_url":"https://avatars.githubusercontent.com/u/8986006?v=3","gravatar_id":"","url":"https://api.github.com/users/swell-d","html_url":"https://github.com/swell-d","followers_url":"https://api.github.com/users/swell-d/followers","following_url":"https://api.github.com/users/swell-d/following{/other_user}","gists_url":"https://api.github.com/users/swell-d/gists{/gist_id}","starred_url":"https://api.github.com/users/swell-d/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/swell-d/subscriptions","organizations_url":"https://api.github.com/users/swell-d/orgs","repos_url":"https://api.github.com/users/swell-d/repos","events_url":"https://api.github.com/users/swell-d/events{/privacy}","received_events_url":"https://api.github.com/users/swell-d/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-10-17T22:39:28Z","updated_at":"2015-10-17T23:01:37Z","closed_at":null,"body":"Hi! \r\nWhen I use now.getHourOfDay I take wrong result (+1 hour).\r\nTime at linux (raspbian) is correct. \r\nTime at Java Machine is correct. \r\nWhat's wrong? May it depend of daylight saving? How I can check it? \r\nTimeZone is Europe/Moscow\r\n\r\nNow I use something like this: now.minusMinutes(60).getHourOfDay but it is horrible."},"comment":{"url":"https://api.github.com/repos/openhab/openhab/issues/comments/148958986","html_url":"https://github.com/openhab/openhab/issues/3311#issuecomment-148958986","issue_url":"https://api.github.com/repos/openhab/openhab/issues/3311","id":148958986,"user":{"login":"swell-d","id":8986006,"avatar_url":"https://avatars.githubusercontent.com/u/8986006?v=3","gravatar_id":"","url":"https://api.github.com/users/swell-d","html_url":"https://github.com/swell-d","followers_url":"https://api.github.com/users/swell-d/followers","following_url":"https://api.github.com/users/swell-d/following{/other_user}","gists_url":"https://api.github.com/users/swell-d/gists{/gist_id}","starred_url":"https://api.github.com/users/swell-d/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/swell-d/subscriptions","organizations_url":"https://api.github.com/users/swell-d/orgs","repos_url":"https://api.github.com/users/swell-d/repos","events_url":"https://api.github.com/users/swell-d/events{/privacy}","received_events_url":"https://api.github.com/users/swell-d/received_events","type":"User","site_admin":false},"created_at":"2015-10-17T23:01:37Z","updated_at":"2015-10-17T23:01:37Z","body":"one more example. rule: \r\n\r\nimport org.openhab.core.library.types.*\r\nimport org.openhab.model.script.actions.*\r\nimport org.joda.time.*\r\n\r\nrule \"Initialize system on startup / rule update\"\r\nwhen\r\n    System started or\r\n\tTime cron \"0/5 * * * * ?\"\r\nthen\r\n    var DateTime sunrise = new DateTime((Sunrise_Time.state as DateTimeType).calendar.timeInMillis)\r\n    var DateTime sunset = new DateTime((Sunset_Time.state as DateTimeType).calendar.timeInMillis)\r\n    Sunrise_Sunset.postUpdate(String::format(\"%02d:%02d / %02d:%02d\", sunrise.getHourOfDay(), sunrise.getMinuteOfHour(), sunset.getHourOfDay(), sunset.getMinuteOfHour()))\r\nend\r\n\r\nsitemap: \r\n\t\t\t\tText item=Sunrise_Sunset\r\n\t\t\t\tText item=Sunrise_Time\r\n\t\t\t\tText item=Sunset_Time\r\n\r\nitems: \r\nString Sunrise_Sunset  \"Восход / Заход [%s]\"    <sun>\r\nDateTime Sunrise_Time  \"Sunrise [%1$tH:%1$tM]\"    <sun>    {astro=\"planet=sun, type=rise, property=start\"}\r\nDateTime Sunset_Time   \"Sunset [%1$tH:%1$tM]\"     <sun>    {astro=\"planet=sun, type=set, property=end\"}\r\n\r\nresult: \r\n![image](https://cloud.githubusercontent.com/assets/8986006/10561650/13476002-753c-11e5-93e3-5685544986b3.png)\r\n"}}