darkoshi: (Default)
Darkoshi ([personal profile] darkoshi) wrote2024-12-31 11:44 pm

sample Copilot coding chat

I saved some screenshots to show how easy it can be (in some cases) to get Copilot to help you with simple coding tasks.

These were my prompts:
1. Hello, please suggest how to code a powershell script to convert values like "1724143246792" to a timestamp format of YYYYMMDD-hhmmss

2. The script should take the input value as a parameter

3. Thank you but it isn't giving the right date. 1724143246792 should convert to approximately 20240819-132248, but the above script gives 16010102-235334

4. Thank you, that works better. But the output time is in UTC and I would like it in Eastern US time

5. Thank you, that is good. If the input value is from the summer, will the output be in EDT, or will it always be in EST?


Copilot's first script sample

Copilot's 2nd script sample taking the input value as a parameter

Copilot's 3rd script sample, converting from a Unix timestamp

Copilot's 4th script sample, converting from Unix to Eastern U.S. time

Copilot's answer regarding how the script handles summer time

Post a comment in response:

If you don't have an account you can create one now.
HTML doesn't work in the subject.
More info about formatting