Skip to content

Commit

Permalink
Replaced arrow with time from stdlib
Browse files Browse the repository at this point in the history
  • Loading branch information
mandeep committed Apr 5, 2017
1 parent f415003 commit 3b1cd6e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions mpad/editor.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import os
import pkg_resources
import time
import sys

import arrow
from PyQt5.QtCore import Qt
from PyQt5.QtGui import QIcon
from PyQt5.QtPrintSupport import QPrintDialog
Expand Down Expand Up @@ -361,12 +361,12 @@ def word_count(self):
def insert_date(self):
"""Insert the current date and time in the format of YYYY-MM-DD HH:mm:ss.
Example: 2016-07-14 15:39:01. The time zone retrieved defaults to
Example: 2017-04-04 22:21:01. The time zone retrieved defaults to
the current user's time zone.
"""
cursor = self.text.textCursor()
time = arrow.now().format('YYYY-MM-DD HH:mm:ss')
cursor.insertText(time)
current_time = time.strftime("%Y-%m-%d %H:%M:%S", time.localtime())
cursor.insertText(current_time)

def menu_bar_visibility(self):
"""Set the visibility of the menu bar.
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@


if sys.version_info.major == 3 and sys.version_info.minor > 5:
requirements = ['arrow', 'pyqt5']
requirements = ['pyqt5']
else:
requirements = ['arrow']
requirements = []


setup(name='MandeepPAD',
Expand Down

0 comments on commit 3b1cd6e

Please sign in to comment.