ctrl+shift+p filters: :st2 :st3 :win :osx :linux
Browse

Convert​Epoch​To​Date

by nexional ALL

Sublime Text package to convert Epoch timestamps to human date

Details

Installs

  • Total 5K
  • Win 3K
  • Mac 1K
  • Linux 254
Jun 15 Jun 14 Jun 13 Jun 12 Jun 11 Jun 10 Jun 9 Jun 8 Jun 7 Jun 6 Jun 5 Jun 4 Jun 3 Jun 2 Jun 1 May 31 May 30 May 29 May 28 May 27 May 26 May 25 May 24 May 23 May 22 May 21 May 20 May 19 May 18 May 17 May 16 May 15 May 14 May 13 May 12 May 11 May 10 May 9 May 8 May 7 May 6 May 5 May 4 May 3 May 2
Windows 0 1 0 1 0 0 1 0 0 1 1 1 2 0 1 0 1 0 0 0 1 1 0 1 0 2 0 0 3 1 2 1 2 0 0 1 2 0 0 0 1 0 0 0 1
Mac 0 0 0 0 1 0 0 0 0 0 1 0 1 0 0 0 0 4 1 1 0 0 0 0 1 1 0 0 1 0 1 0 0 1 1 0 0 0 0 0 0 0 1 0 0
Linux 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 2 0 1 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0
01234Jun 15Jun 12Jun 9Jun 6Jun 3May 31May 28May 25May 22May 19May 16May 13May 10May 7May 4Jun 15 Linux: 0 Mac: 0 Windows: 0Jun 14 Linux: 0 Mac: 0 Windows: 1Jun 13 Linux: 0 Mac: 0 Windows: 0Jun 12 Linux: 0 Mac: 0 Windows: 1Jun 11 Linux: 0 Mac: 1 Windows: 0Jun 10 Linux: 0 Mac: 0 Windows: 0Jun 9 Linux: 0 Mac: 0 Windows: 1Jun 8 Linux: 0 Mac: 0 Windows: 0Jun 7 Linux: 0 Mac: 0 Windows: 0Jun 6 Linux: 0 Mac: 0 Windows: 1Jun 5 Linux: 0 Mac: 1 Windows: 1Jun 4 Linux: 0 Mac: 0 Windows: 1Jun 3 Linux: 0 Mac: 1 Windows: 2Jun 2 Linux: 0 Mac: 0 Windows: 0Jun 1 Linux: 0 Mac: 0 Windows: 1May 31 Linux: 0 Mac: 0 Windows: 0May 30 Linux: 1 Mac: 0 Windows: 1May 29 Linux: 0 Mac: 4 Windows: 0May 28 Linux: 1 Mac: 1 Windows: 0May 27 Linux: 0 Mac: 1 Windows: 0May 26 Linux: 2 Mac: 0 Windows: 1May 25 Linux: 0 Mac: 0 Windows: 1May 24 Linux: 1 Mac: 0 Windows: 0May 23 Linux: 0 Mac: 0 Windows: 1May 22 Linux: 0 Mac: 1 Windows: 0May 21 Linux: 0 Mac: 1 Windows: 2May 20 Linux: 0 Mac: 0 Windows: 0May 19 Linux: 0 Mac: 0 Windows: 0May 18 Linux: 0 Mac: 1 Windows: 3May 17 Linux: 0 Mac: 0 Windows: 1May 16 Linux: 0 Mac: 1 Windows: 2May 15 Linux: 0 Mac: 0 Windows: 1May 14 Linux: 0 Mac: 0 Windows: 2May 13 Linux: 0 Mac: 1 Windows: 0May 12 Linux: 1 Mac: 1 Windows: 0May 11 Linux: 0 Mac: 0 Windows: 1May 10 Linux: 0 Mac: 0 Windows: 2May 9 Linux: 0 Mac: 0 Windows: 0May 8 Linux: 0 Mac: 0 Windows: 0May 7 Linux: 0 Mac: 0 Windows: 0May 6 Linux: 1 Mac: 0 Windows: 1May 5 Linux: 0 Mac: 0 Windows: 0May 4 Linux: 0 Mac: 1 Windows: 0May 3 Linux: 0 Mac: 0 Windows: 0May 2 Linux: 0 Mac: 0 Windows: 1Jun 15 Linux: 0 Mac: 0 Windows: 0Jun 14 Linux: 0 Mac: 0 Windows: 1Jun 13 Linux: 0 Mac: 0 Windows: 0Jun 12 Linux: 0 Mac: 0 Windows: 1Jun 11 Linux: 0 Mac: 1 Windows: 0Jun 10 Linux: 0 Mac: 0 Windows: 0Jun 9 Linux: 0 Mac: 0 Windows: 1Jun 8 Linux: 0 Mac: 0 Windows: 0Jun 7 Linux: 0 Mac: 0 Windows: 0Jun 6 Linux: 0 Mac: 0 Windows: 1Jun 5 Linux: 0 Mac: 1 Windows: 1Jun 4 Linux: 0 Mac: 0 Windows: 1Jun 3 Linux: 0 Mac: 1 Windows: 2Jun 2 Linux: 0 Mac: 0 Windows: 0Jun 1 Linux: 0 Mac: 0 Windows: 1May 31 Linux: 0 Mac: 0 Windows: 0May 30 Linux: 1 Mac: 0 Windows: 1May 29 Linux: 0 Mac: 4 Windows: 0May 28 Linux: 1 Mac: 1 Windows: 0May 27 Linux: 0 Mac: 1 Windows: 0May 26 Linux: 2 Mac: 0 Windows: 1May 25 Linux: 0 Mac: 0 Windows: 1May 24 Linux: 1 Mac: 0 Windows: 0May 23 Linux: 0 Mac: 0 Windows: 1May 22 Linux: 0 Mac: 1 Windows: 0May 21 Linux: 0 Mac: 1 Windows: 2May 20 Linux: 0 Mac: 0 Windows: 0May 19 Linux: 0 Mac: 0 Windows: 0May 18 Linux: 0 Mac: 1 Windows: 3May 17 Linux: 0 Mac: 0 Windows: 1May 16 Linux: 0 Mac: 1 Windows: 2May 15 Linux: 0 Mac: 0 Windows: 1May 14 Linux: 0 Mac: 0 Windows: 2May 13 Linux: 0 Mac: 1 Windows: 0May 12 Linux: 1 Mac: 1 Windows: 0May 11 Linux: 0 Mac: 0 Windows: 1May 10 Linux: 0 Mac: 0 Windows: 2May 9 Linux: 0 Mac: 0 Windows: 0May 8 Linux: 0 Mac: 0 Windows: 0May 7 Linux: 0 Mac: 0 Windows: 0May 6 Linux: 1 Mac: 0 Windows: 1May 5 Linux: 0 Mac: 0 Windows: 0May 4 Linux: 0 Mac: 1 Windows: 0May 3 Linux: 0 Mac: 0 Windows: 0May 2 Linux: 0 Mac: 0 Windows: 1Jun 15 Linux: 0 Mac: 0 Windows: 0Jun 14 Linux: 0 Mac: 0 Windows: 1Jun 13 Linux: 0 Mac: 0 Windows: 0Jun 12 Linux: 0 Mac: 0 Windows: 1Jun 11 Linux: 0 Mac: 1 Windows: 0Jun 10 Linux: 0 Mac: 0 Windows: 0Jun 9 Linux: 0 Mac: 0 Windows: 1Jun 8 Linux: 0 Mac: 0 Windows: 0Jun 7 Linux: 0 Mac: 0 Windows: 0Jun 6 Linux: 0 Mac: 0 Windows: 1Jun 5 Linux: 0 Mac: 1 Windows: 1Jun 4 Linux: 0 Mac: 0 Windows: 1Jun 3 Linux: 0 Mac: 1 Windows: 2Jun 2 Linux: 0 Mac: 0 Windows: 0Jun 1 Linux: 0 Mac: 0 Windows: 1May 31 Linux: 0 Mac: 0 Windows: 0May 30 Linux: 1 Mac: 0 Windows: 1May 29 Linux: 0 Mac: 4 Windows: 0May 28 Linux: 1 Mac: 1 Windows: 0May 27 Linux: 0 Mac: 1 Windows: 0May 26 Linux: 2 Mac: 0 Windows: 1May 25 Linux: 0 Mac: 0 Windows: 1May 24 Linux: 1 Mac: 0 Windows: 0May 23 Linux: 0 Mac: 0 Windows: 1May 22 Linux: 0 Mac: 1 Windows: 0May 21 Linux: 0 Mac: 1 Windows: 2May 20 Linux: 0 Mac: 0 Windows: 0May 19 Linux: 0 Mac: 0 Windows: 0May 18 Linux: 0 Mac: 1 Windows: 3May 17 Linux: 0 Mac: 0 Windows: 1May 16 Linux: 0 Mac: 1 Windows: 2May 15 Linux: 0 Mac: 0 Windows: 1May 14 Linux: 0 Mac: 0 Windows: 2May 13 Linux: 0 Mac: 1 Windows: 0May 12 Linux: 1 Mac: 1 Windows: 0May 11 Linux: 0 Mac: 0 Windows: 1May 10 Linux: 0 Mac: 0 Windows: 2May 9 Linux: 0 Mac: 0 Windows: 0May 8 Linux: 0 Mac: 0 Windows: 0May 7 Linux: 0 Mac: 0 Windows: 0May 6 Linux: 1 Mac: 0 Windows: 1May 5 Linux: 0 Mac: 0 Windows: 0May 4 Linux: 0 Mac: 1 Windows: 0May 3 Linux: 0 Mac: 0 Windows: 0May 2 Linux: 0 Mac: 0 Windows: 1

Readme

Source
raw.​githubusercontent.​com

Convert Epoch To Date

Installation

  • Install Sublime Text Package Control. Ignore if installed already
  • Tools > Command Palette > Input/select Package Control: Install Package
  • Enter ConvertEpochToDate

Documentation

Sublime Text package to convert Epoch timestamps to human date.

This package converts Epoch timestamp to human date in your local time zone. It works on the selection or the word under caret (not mouse pointer). The replacement is done in-place & can be undone using Undo (ctrl+z) command. In-place replacement can be disabled if desired (refer Customization section below).

If the view/file is readonly or in-place replacement can't be made then only the status bar message is shown. A message box is displayed in this case which can be disabled.

10-13 digits are expected as Epoch timestamp. Anything else is ignored.

Default output date format is %a %d %b %Y %I:%M:%S %p + XXXms e.g. Tue 01 Jan 2019 01:02:34 AM + 123ms. It can be customized to the format you want (refer Customization section below).

Any output/messages/errors are always displayed in Status bar.

How to use

There are 4 ways you can invoke the command:

  • Tools > “Convert Epoch to Date”
  • Context menu (Right click) > “Convert Epoch to Date”
  • Command Palette (Ctrl + Shift + P on Windows or Cmd + Shift + P on Mac) > Input “Convert Epoch To Date”
  • Use following keyboard shortcuts:
    • ctrl+alt+, (Windows)
    • super+alt+, (macOS/OSX)
    • ctrl+alt+, (Linux)

You can also override the default binding in your User Key Binding file e.g.

{ "keys": ["ctrl+alt+t"], "command": "convert_epoch_to_date" }

Customization

Following parameters can be overridden in User Settings file (Preferences > Package Settings > ConvertEpochToDate > Settings - User) to the value desired:

{
    // in-place replacement to date
    "in_place_replacement": true,

    // defines custom output date format. visit strftime.org for possible format directives
    "output_date_format": "%a %d %b %Y %I:%M:%S %p",

    // if set to true, appends milliseconds at the end of output date
    "show_milliseconds": true,

    // shows message box for output date
    "show_message_box": false,

    // shows message box only for readonly views. not used if show_message_box set to true
    "show_message_box_for_readonly": true
}

License

GNU General Public License v3.0

Issues

Please report any bugs/issues here

Links