From f817e3c89aae50fbc30868da8fb6626cc2fb8c73 Mon Sep 17 00:00:00 2001
From: Joram Wilander <jwawilander@gmail.com>
Date: Fri, 29 Apr 2016 11:56:46 -0400
Subject: Fix date on pasted images (#2830)

---
 webapp/components/file_upload.jsx | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'webapp/components/file_upload.jsx')

diff --git a/webapp/components/file_upload.jsx b/webapp/components/file_upload.jsx
index 03a8a8128..0fa8a892b 100644
--- a/webapp/components/file_upload.jsx
+++ b/webapp/components/file_upload.jsx
@@ -242,7 +242,7 @@ class FileUpload extends React.Component {
                             min = String(d.getMinutes());
                         }
 
-                        const name = formatMessage(holders.pasted) + d.getFullYear() + '-' + d.getMonth() + '-' + d.getDate() + ' ' + hour + '-' + min + '.' + ext;
+                        const name = formatMessage(holders.pasted) + d.getFullYear() + '-' + (d.getMonth() + 1) + '-' + d.getDate() + ' ' + hour + '-' + min + '.' + ext;
 
                         const request = Client.uploadFile(file,
                             name,
-- 
cgit v1.2.3-1-g7c22

