Calculator: Epoch timestamp to Datetime converter

Created on 9 Mar 2019  路  6Comments  路  Source: microsoft/calculator

Problem Statement
The calculator provides plenty of tools to help developers: a Programmer mode, conversion from a base to another, a binary number editor, Data converter, ... but one tool is missing to complete the ideal toolbox: a converter to convert "human" date/time to system time (and vice-versa).

Evidence or User Insights
While it's easy to convert kilobytes to gigabytes, it's not easy to convert Epoch time or FILETIME struct to "human" time without using a tool. Such a tool, even if basic, doesn't exist in Visual Studio or in Visual Studio Code, and only a few developers will install an app only for this purpose, so we mainly rely on web to verify system times when we debug an application.

A simple chrome extension converting dates to epoch time (only) has more than 16K downloads for example.

Proposal
We should add an extra option in Date Calculation, allowing developers to not only convert dates from/to epoch time, but also from/to FILETIME, Mac time, LDAP time, Chromium time, etc...

Goals

  • Users can convert a "human" date to a system time.
  • Users can convert a system time to "human" date.
  • Users can easily copy the system time to the Programmer calculator

Non-Goals

  • Users can't directly convert a system time to another, but they can select a system time format in the combobox, type a system time, then select another system time format in the combobox, the Calculator will then display the same date/time in the new format.

Low-Fidelity Concept

Capture

image
(we will need to customize the timePicker to manage seconds/milliseconds or use another way to select a time)

image

We can also:

  • display the date selected using the ISO-8601 format at the bottom of the window in local and UTC.
  • add Datetime.Tick (https://docs.microsoft.com/en-us/dotnet/api/system.datetime.ticks?view=netframework-4.7.2)
Enhancement 2 help wanted needs spec

Most helpful comment

A couple examples come to mind:

  • How do we implement the Date + Time picker?

Another question is: how do we manage seconds, knowing that TimePicker only supports Hours and Minutes? Should we add seconds to the TimePicker control (I'm sure a lot of other projects would like it)

All 6 comments

This is your friendly Microsoft Issue Bot. I've seen this issue come in and have gone to tell a human about it.

Thanks for the feature suggestion! We have a process in place for feature suggestions that impact the end-user experience, which includes a template that helps frame the feature pitch. Can you update the issue using that template?

Something to consider. I think it might be safe to assume that a lot of developers are also Calculator users, but I don鈥檛 think we can assume that developers represent the _typical_ Calculator user. Programmer mode is an example of a feature that is obviously catered to that subset of users, but that is separated from other modes. I think epoch/DateTime conversion would be awesome! How might we add support for this without adding complexity for _typical_ users in Date Calculation or Time Converter modes?

The template didn't exist at this time :) I will work on some mockups later tonight and update the first post.

Done! Don't hesitate to give feedback!

We reviewed the pitch and would love to move forward with it! I think this pitch is a great start, but there are still some open questions. Moving this into planning to iron out some of the details.

A couple examples come to mind:

  • How do we implement the Date + Time picker?
  • Does it make more sense to include this as a converter instead of adding to Date Calculator?

I created calculator-specs/epochconverter to track progress. For more information on next steps, check out our spec workflow.

A couple examples come to mind:

  • How do we implement the Date + Time picker?

Another question is: how do we manage seconds, knowing that TimePicker only supports Hours and Minutes? Should we add seconds to the TimePicker control (I'm sure a lot of other projects would like it)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

InfoLibre picture InfoLibre  路  17Comments

MicrosoftIssueBot picture MicrosoftIssueBot  路  19Comments

ThiefMaster picture ThiefMaster  路  30Comments

TristanYoung picture TristanYoung  路  28Comments

ialhashim picture ialhashim  路  14Comments