GetRSSDateTime() is Returning Date in the Wrong Timezone

kentico guy asked on January 17, 2020 21:09

I am trying to figure out why Kentico is randomly assuming I want the date time transformed into GMT. I have set the parent web part timezone to EST explicitly, and there is NOTHING in the entire app configured for GMT.

The web part is a query repeater and the returns are fed into a transformation like this:

<item>
  <pubDate><%# GetRSSDateTime(Eval("Date")) %></pubDate>
</item>

In the web part properties (per the Kentico documentation)

Time zone: Custom

Custom time zone: (UTC-05.00) Eastern Time (US & Canada) 

I set as above in the webpart properties > timezone .. saved, checked the RSS feed on another computer and IT's STILL pulling in GMT

... since that did absolutely nothing, where does this setting come from? The server is not in GMT. The app is not in GMT. The user profile is not in GMT. The time in the server logs is EST. The time on EVERY document and EVERY other page is in EST.

Does anyone know where this setting is hidden in Kentico? It's certainly nowhere apparent or intuitive

Correct Answer

Juraj Ondrus answered on January 20, 2020 08:57

Regrettably, the GetRSSDateTime method is using .ToUniversalTime() method which converts the date/time to UTC. In this case I would try using the GetDateTime transformation method to get the current time form the server.

1 votesVote for this answer Unmark Correct answer

Recent Answers


kentico guy answered on January 20, 2020 19:43

I think that worked; thank you!

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.