Skip to content

How to set "Published" date to match local time? #34

Answered by DinoBansigan
DinoBansigan asked this question in Q&A
Discussion options

You must be logged in to vote

I solved this issue by adding something like this to my config.wyam file:

Pipelines["BlogPosts"].Append(
  Meta(BlogKeys.Published, (doc, ctx) =>
  {   	
		string published = doc.Get<string>("Published");
		return DateTime.Parse(published).ToUniversalTime().ToString();
  }));

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by DinoBansigan
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant