GoConqr has a new look! Let us know what you think.

Flashcards

Dates and times .NET

Felipe Couto Viola C# Portuguese 7 cards

Cards in this deck (7)

  1. 1Principais problemas quando se trabalha com datas.Ambiguidade (10/06/2019) - Junho ou Outubro?
    Nem sempre temos controle de onde estamos recebendo as informações de tempo.(servidores em outros países etc...)
    Ambiguidade de tempo (10:00) p.m ou a.m? qual timezone?
  2. 2Formato do ISO-8061 e qual a sua finalidade.Foi feito para eliminar a ambiguidade e seu formato consiste em: ano-mes-diaThora:minuto:segundo+timezone
    Exemplo: 2019-06-10T18:00:00+00:00
  3. 3DateTime timezoneDateTime não tem o timezone específico, indica apenas se é local, utc ou não especificado.
  4. 4Quando usar DateTimeDate - Date&time arithmetic
    Time -missing timezone information
    UTC - interop with external systems
  5. 5Convertendo entre timezonesvar time = DateTime.Now
    TimeZoneInfo tInfo = TimeZoneInfo.FindSystemTimeZoneById("XPTO")
    var xtpoTime = TimeZoneInfo.ConvertTime(time,tInfo)
  6. 6Best PracticeAlways work with UTC dates and time.
  7. 7Formas de Parse DateTimevar str = "9/10/2019 10:00:00 PM"
    DateTime.ParseExact(str, "M/d/yyyy h:mm:ss tt",CultureInfo.InvariantCulture)

Information

Description
C# Flashcards on Dates and times .NET, created by Felipe Couto Viola on 06/08/2019.
Views
35
Tags
.netc#
Rating

Feedback

What is it about?

What do you think of the new look?

How do you like it?