Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

local time #1

Open
yudiannlu opened this issue Nov 14, 2018 · 1 comment
Open

local time #1

yudiannlu opened this issue Nov 14, 2018 · 1 comment
Assignees
Labels
enhancement New feature or request question Further information is requested

Comments

@yudiannlu
Copy link

how to change BuildDateText to local time, not UTC?

@dwcullop dwcullop self-assigned this Nov 15, 2018
@dwcullop dwcullop added enhancement New feature or request question Further information is requested labels Nov 15, 2018
@dwcullop
Copy link
Owner

dwcullop commented Nov 15, 2018

I suggest leaving it UTC because the local time is going to depend on where the app is being run, but there are a couple of ways to do what you want.

  1. BuildInfo.BuildDateUtc.ToLocalTime()
  2. Change Line #9
    From: DateTime dtBuildDate = DateTime.UtcNow;
    To: DateTime dtBuildDate = DateTime.Now;

I will consider adding properties for obtaining the build time in either format in a future revision. Is that what you're looking for?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants