Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8194277
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T04:46:07+00:00 2026-06-07T04:46:07+00:00

I have the next simple code… Console.WriteLine(default(DateTime).Date.ToString(U)); The, emitted text is (I have an

  • 0

I have the next simple code…

Console.WriteLine(default(DateTime).Date.ToString("U"));

The, emitted text is (I have an spanish language installation):
“lunes, 01 de enero de 0001 3:00:00”

Why it starts at 3 hours, instead of 0? it is a bug?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T04:46:09+00:00Added an answer on June 7, 2026 at 4:46 am

    Well unless you’ve got a time machine or DateTime is really buggy, that’s not the output of the code you posted, which uses DateTime.Now.

    I suspect your code is really using DateTime.MinValue (or new DateTime()), and the reason that you’re seeing 3am is that (as per the documentation):

    The pattern is the same as the “F” pattern. However, the DateTime value is automatically converted to UTC before it is formatted.

    So I suspect you’re in a time zone where midnight on January 1st 0001 local time is 3am UTC. (DateTimeZone.MinValue has a “kind” of Unspecified, so will be treated as local when asked to convert to UTC. DateTime is a bit of a mess around this area.)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a fairly simple block of code. Sub Run(Name) on error resume next
I have next 2 blocks of code: def replace_re(text): start = time.time() new_text =
Next question about russian encoding, mssql and python. I have this simple code: import
I have the next simple logging code: function log($exception) { error_log($exception->getMessage() . \n, 3,
I have the following, simple code: $text = str_replace($f,'<a href='.$f.' target=_blank>'.$u.'</a>',$text); where $f is
I have next code, <form id=form1 runat=server> <asp:Label runat=server ID=Label1 EnableViewState=false /> <asp:CheckBox runat=server
I have next code: int main() { OwnSelect(23, FD_READ | FD_WRITE); // <---- Several
I have next code require 'rack/rpc' class Server < Rack::RPC::Server def hello_world Hello, world!
I have the following simple code for testing a webservice : using System; using
I'm getting some weird output when running (seemingly simple) code. Here's what I have:

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.