date - Convert timestamp to datetime in erlang -


How do I change a timestamp (the number of milliseconds 1 January 1970) in date or date format in Erlang? Something like this {year, month, day}

Broadly:

  MSDod (miliseconds) - & gt; ; Baset = Calendar: datetime_to_gregorian_seconds ({{1970,1,1}, {0,0,0}}, seconds = basedate + (milliseconds div 1000), {date, _Time} = calendar: gregorian_second_t_ttime (second), date.  

Comments

Popular posts from this blog

python - Overriding the save method in Django ModelForm -

html - CSS autoheight, but fit content to height of div -

qt - How to prevent QAudioInput from automatically boosting the master volume to 100%? -