Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

916
Vistas
Convert Binance timestamp into valid datetime

I dont know how to covert timestamp given by Binance server into valid DateTime.

Binance.API.Csharp.Client.Models.General.ServerInfo returns 1615724572987 which after conversion to DateTime gives 1/2/0001 9:52:52 PM which obviously is not correct.

I tried to find description about ServerInfo type but there is only GetHtml Function.

over 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

From this question you will learn that

"[In binance API] All time and timestamp related fields are in milliseconds." (unix style)

And from this question you will learn to convert unix timestamp to DateTime.

Then combine this knowledge to create this method:

public static DateTime BinanceTimeStampToUtcDateTime(double binanceTimeStamp)
{
    // Binance timestamp is milliseconds past epoch
    var epoch = new DateTime(1970,1,1,0,0,0,0,System.DateTimeKind.Utc);
    return epoch.AddMilliseconds(binanceTimeStamp);
}
over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda