Skip to content

DateTime.Now is wrong when i change Ubuntu server Time #10080

@shakeri

Description

@shakeri

When i change Date and Time on Ubuntu server with this command:
sudo date --set "25 Apr 2018 16:00:00"
And run this code:
Console.WriteLine(DateTime.Now);
here are its output!
4/3/2018 15:00:30
While the current server time is 4/3/2018 16:00:55
My app.csproj file

<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <OutputType>Exe</OutputType>
    <TargetFramework>netcoreapp2.0</TargetFramework>
  </PropertyGroup>
</Project>

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions