[jira] [Work logged] (BEAM-6947) TestGCSIO.test_last_updated (gcsio_test.py) fails when the current timezone offset and the timezone offset on 2nd of Jan 1970 differ

2019-10-05 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/BEAM-6947?focusedWorklogId=323975=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-323975
 ]

ASF GitHub Bot logged work on BEAM-6947:


Author: ASF GitHub Bot
Created on: 05/Oct/19 20:14
Start Date: 05/Oct/19 20:14
Worklog Time Spent: 10m 
  Work Description: stale[bot] commented on pull request #8180: [BEAM-6947] 
Fix for failing TestGCSIO.test_last_updated (gcsio_test.py) test
URL: https://github.com/apache/beam/pull/8180
 
 
   
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 323975)
Time Spent: 1.5h  (was: 1h 20m)

> TestGCSIO.test_last_updated (gcsio_test.py) fails when the current timezone 
> offset and the timezone offset on 2nd of Jan 1970 differ
> 
>
> Key: BEAM-6947
> URL: https://issues.apache.org/jira/browse/BEAM-6947
> Project: Beam
>  Issue Type: Bug
>  Components: sdk-py-core
>Reporter: Csaba Kassai
>Assignee: Csaba Kassai
>Priority: Major
>  Time Spent: 1.5h
>  Remaining Estimate: 0h
>
> The test TestGCSIO.test_last_updated uses timestamp 123456.78 as the last 
> updated timestamp.  This timestamp is converted into a naive datetime in the 
> Fakefile class get_metadata method (gcsio_test.py line 72) Then in the GcsIO 
> class last_updated method (gcsio.py ) is converted back to timestamp. But the 
> conversion is incorrect when the the timezone offset is different in 1970 and 
> now. In my case now Singapore is GMT+8 and it was only GMT+7:30 in 1970. So 
> the test fails. 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Work logged] (BEAM-6947) TestGCSIO.test_last_updated (gcsio_test.py) fails when the current timezone offset and the timezone offset on 2nd of Jan 1970 differ

2019-10-05 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/BEAM-6947?focusedWorklogId=323974=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-323974
 ]

ASF GitHub Bot logged work on BEAM-6947:


Author: ASF GitHub Bot
Created on: 05/Oct/19 20:14
Start Date: 05/Oct/19 20:14
Worklog Time Spent: 10m 
  Work Description: stale[bot] commented on issue #8180: [BEAM-6947] Fix 
for failing TestGCSIO.test_last_updated (gcsio_test.py) test
URL: https://github.com/apache/beam/pull/8180#issuecomment-538684818
 
 
   This pull request has been closed due to lack of activity. If you think that 
is incorrect, or the pull request requires review, you can revive the PR at any 
time.
   
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 323974)
Time Spent: 1h 20m  (was: 1h 10m)

> TestGCSIO.test_last_updated (gcsio_test.py) fails when the current timezone 
> offset and the timezone offset on 2nd of Jan 1970 differ
> 
>
> Key: BEAM-6947
> URL: https://issues.apache.org/jira/browse/BEAM-6947
> Project: Beam
>  Issue Type: Bug
>  Components: sdk-py-core
>Reporter: Csaba Kassai
>Assignee: Csaba Kassai
>Priority: Major
>  Time Spent: 1h 20m
>  Remaining Estimate: 0h
>
> The test TestGCSIO.test_last_updated uses timestamp 123456.78 as the last 
> updated timestamp.  This timestamp is converted into a naive datetime in the 
> Fakefile class get_metadata method (gcsio_test.py line 72) Then in the GcsIO 
> class last_updated method (gcsio.py ) is converted back to timestamp. But the 
> conversion is incorrect when the the timezone offset is different in 1970 and 
> now. In my case now Singapore is GMT+8 and it was only GMT+7:30 in 1970. So 
> the test fails. 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Work logged] (BEAM-6947) TestGCSIO.test_last_updated (gcsio_test.py) fails when the current timezone offset and the timezone offset on 2nd of Jan 1970 differ

2019-09-28 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/BEAM-6947?focusedWorklogId=320050=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-320050
 ]

ASF GitHub Bot logged work on BEAM-6947:


Author: ASF GitHub Bot
Created on: 28/Sep/19 19:20
Start Date: 28/Sep/19 19:20
Worklog Time Spent: 10m 
  Work Description: stale[bot] commented on issue #8180: [BEAM-6947] Fix 
for failing TestGCSIO.test_last_updated (gcsio_test.py) test
URL: https://github.com/apache/beam/pull/8180#issuecomment-536218501
 
 
   This pull request has been marked as stale due to 60 days of inactivity. It 
will be closed in 1 week if no further activity occurs. If you think that’s 
incorrect or this pull request requires a review, please simply write any 
comment. If closed, you can revive the PR at any time and @mention a reviewer 
or discuss it on the d...@beam.apache.org list. Thank you for your 
contributions.
   
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 320050)
Time Spent: 1h 10m  (was: 1h)

> TestGCSIO.test_last_updated (gcsio_test.py) fails when the current timezone 
> offset and the timezone offset on 2nd of Jan 1970 differ
> 
>
> Key: BEAM-6947
> URL: https://issues.apache.org/jira/browse/BEAM-6947
> Project: Beam
>  Issue Type: Bug
>  Components: sdk-py-core
>Reporter: Csaba Kassai
>Assignee: Csaba Kassai
>Priority: Major
>  Time Spent: 1h 10m
>  Remaining Estimate: 0h
>
> The test TestGCSIO.test_last_updated uses timestamp 123456.78 as the last 
> updated timestamp.  This timestamp is converted into a naive datetime in the 
> Fakefile class get_metadata method (gcsio_test.py line 72) Then in the GcsIO 
> class last_updated method (gcsio.py ) is converted back to timestamp. But the 
> conversion is incorrect when the the timezone offset is different in 1970 and 
> now. In my case now Singapore is GMT+8 and it was only GMT+7:30 in 1970. So 
> the test fails. 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Work logged] (BEAM-6947) TestGCSIO.test_last_updated (gcsio_test.py) fails when the current timezone offset and the timezone offset on 2nd of Jan 1970 differ

2019-07-30 Thread ASF GitHub Bot (JIRA)


 [ 
https://issues.apache.org/jira/browse/BEAM-6947?focusedWorklogId=285154=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-285154
 ]

ASF GitHub Bot logged work on BEAM-6947:


Author: ASF GitHub Bot
Created on: 30/Jul/19 18:41
Start Date: 30/Jul/19 18:41
Worklog Time Spent: 10m 
  Work Description: chamikaramj commented on issue #8180: [BEAM-6947] Fix 
for failing TestGCSIO.test_last_updated (gcsio_test.py) test
URL: https://github.com/apache/beam/pull/8180#issuecomment-516543654
 
 
   Any updates ?
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 285154)
Time Spent: 1h  (was: 50m)

> TestGCSIO.test_last_updated (gcsio_test.py) fails when the current timezone 
> offset and the timezone offset on 2nd of Jan 1970 differ
> 
>
> Key: BEAM-6947
> URL: https://issues.apache.org/jira/browse/BEAM-6947
> Project: Beam
>  Issue Type: Bug
>  Components: sdk-py-core
>Reporter: Csaba Kassai
>Assignee: Csaba Kassai
>Priority: Major
>  Time Spent: 1h
>  Remaining Estimate: 0h
>
> The test TestGCSIO.test_last_updated uses timestamp 123456.78 as the last 
> updated timestamp.  This timestamp is converted into a naive datetime in the 
> Fakefile class get_metadata method (gcsio_test.py line 72) Then in the GcsIO 
> class last_updated method (gcsio.py ) is converted back to timestamp. But the 
> conversion is incorrect when the the timezone offset is different in 1970 and 
> now. In my case now Singapore is GMT+8 and it was only GMT+7:30 in 1970. So 
> the test fails. 



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)


[jira] [Work logged] (BEAM-6947) TestGCSIO.test_last_updated (gcsio_test.py) fails when the current timezone offset and the timezone offset on 2nd of Jan 1970 differ

2019-06-11 Thread ASF GitHub Bot (JIRA)


 [ 
https://issues.apache.org/jira/browse/BEAM-6947?focusedWorklogId=258091=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-258091
 ]

ASF GitHub Bot logged work on BEAM-6947:


Author: ASF GitHub Bot
Created on: 11/Jun/19 20:29
Start Date: 11/Jun/19 20:29
Worklog Time Spent: 10m 
  Work Description: lukecwik commented on issue #8180: [BEAM-6947] Fix for 
failing TestGCSIO.test_last_updated (gcsio_test.py) test
URL: https://github.com/apache/beam/pull/8180#issuecomment-501010417
 
 
   @udim Pinging this review since it is stale and seems like the change is 
still worthwhile.
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 258091)
Time Spent: 50m  (was: 40m)

> TestGCSIO.test_last_updated (gcsio_test.py) fails when the current timezone 
> offset and the timezone offset on 2nd of Jan 1970 differ
> 
>
> Key: BEAM-6947
> URL: https://issues.apache.org/jira/browse/BEAM-6947
> Project: Beam
>  Issue Type: Bug
>  Components: sdk-py-core
>Reporter: Csaba Kassai
>Assignee: Csaba Kassai
>Priority: Major
>  Time Spent: 50m
>  Remaining Estimate: 0h
>
> The test TestGCSIO.test_last_updated uses timestamp 123456.78 as the last 
> updated timestamp.  This timestamp is converted into a naive datetime in the 
> Fakefile class get_metadata method (gcsio_test.py line 72) Then in the GcsIO 
> class last_updated method (gcsio.py ) is converted back to timestamp. But the 
> conversion is incorrect when the the timezone offset is different in 1970 and 
> now. In my case now Singapore is GMT+8 and it was only GMT+7:30 in 1970. So 
> the test fails. 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Work logged] (BEAM-6947) TestGCSIO.test_last_updated (gcsio_test.py) fails when the current timezone offset and the timezone offset on 2nd of Jan 1970 differ

2019-06-10 Thread ASF GitHub Bot (JIRA)


 [ 
https://issues.apache.org/jira/browse/BEAM-6947?focusedWorklogId=257312=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-257312
 ]

ASF GitHub Bot logged work on BEAM-6947:


Author: ASF GitHub Bot
Created on: 11/Jun/19 01:37
Start Date: 11/Jun/19 01:37
Worklog Time Spent: 10m 
  Work Description: stale[bot] commented on issue #8180: [BEAM-6947] Fix 
for failing TestGCSIO.test_last_updated (gcsio_test.py) test
URL: https://github.com/apache/beam/pull/8180#issuecomment-500652616
 
 
   This pull request has been marked as stale due to 60 days of inactivity. It 
will be closed in 1 week if no further activity occurs. If you think that’s 
incorrect or this pull request requires a review, please simply write any 
comment. If closed, you can revive the PR at any time and @mention a reviewer 
or discuss it on the d...@beam.apache.org list. Thank you for your 
contributions.
   
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 257312)
Time Spent: 40m  (was: 0.5h)

> TestGCSIO.test_last_updated (gcsio_test.py) fails when the current timezone 
> offset and the timezone offset on 2nd of Jan 1970 differ
> 
>
> Key: BEAM-6947
> URL: https://issues.apache.org/jira/browse/BEAM-6947
> Project: Beam
>  Issue Type: Bug
>  Components: sdk-py-core
>Reporter: Csaba Kassai
>Assignee: Csaba Kassai
>Priority: Major
>  Time Spent: 40m
>  Remaining Estimate: 0h
>
> The test TestGCSIO.test_last_updated uses timestamp 123456.78 as the last 
> updated timestamp.  This timestamp is converted into a naive datetime in the 
> Fakefile class get_metadata method (gcsio_test.py line 72) Then in the GcsIO 
> class last_updated method (gcsio.py ) is converted back to timestamp. But the 
> conversion is incorrect when the the timezone offset is different in 1970 and 
> now. In my case now Singapore is GMT+8 and it was only GMT+7:30 in 1970. So 
> the test fails. 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Work logged] (BEAM-6947) TestGCSIO.test_last_updated (gcsio_test.py) fails when the current timezone offset and the timezone offset on 2nd of Jan 1970 differ

2019-04-11 Thread ASF GitHub Bot (JIRA)


 [ 
https://issues.apache.org/jira/browse/BEAM-6947?focusedWorklogId=226438=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-226438
 ]

ASF GitHub Bot logged work on BEAM-6947:


Author: ASF GitHub Bot
Created on: 12/Apr/19 00:40
Start Date: 12/Apr/19 00:40
Worklog Time Spent: 10m 
  Work Description: udim commented on pull request #8180: [BEAM-6947] Fix 
for failing TestGCSIO.test_last_updated (gcsio_test.py) test
URL: https://github.com/apache/beam/pull/8180#discussion_r274726884
 
 

 ##
 File path: sdks/python/apache_beam/io/gcp/gcsio.py
 ##
 @@ -458,7 +460,11 @@ def last_updated(self, path):
 request = storage.StorageObjectsGetRequest(
 bucket=bucket, object=object_path)
 datetime = self.client.objects.Get(request).updated
-return (time.mktime(datetime.timetuple()) - time.timezone
+
+utc_datetime = pytz.utc.localize(datetime)
+utc_offset = 
utc_datetime.astimezone(tzlocal.get_localzone()).utcoffset().total_seconds()
 
 Review comment:
   What do you think of explicitly specifying the beginning of the unix epoch:
   ```py
   seconds = (utc_datetime - datetime.datetime(1970, 1, 1, 
tzinfo=pytz.utc)).total_seconds()
   ```
   (based on this answer: https://stackoverflow.com/a/17257177/63302)
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 226438)
Time Spent: 0.5h  (was: 20m)

> TestGCSIO.test_last_updated (gcsio_test.py) fails when the current timezone 
> offset and the timezone offset on 2nd of Jan 1970 differ
> 
>
> Key: BEAM-6947
> URL: https://issues.apache.org/jira/browse/BEAM-6947
> Project: Beam
>  Issue Type: Bug
>  Components: sdk-py-core
>Reporter: Csaba Kassai
>Assignee: Csaba Kassai
>Priority: Major
>  Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> The test TestGCSIO.test_last_updated uses timestamp 123456.78 as the last 
> updated timestamp.  This timestamp is converted into a naive datetime in the 
> Fakefile class get_metadata method (gcsio_test.py line 72) Then in the GcsIO 
> class last_updated method (gcsio.py ) is converted back to timestamp. But the 
> conversion is incorrect when the the timezone offset is different in 1970 and 
> now. In my case now Singapore is GMT+8 and it was only GMT+7:30 in 1970. So 
> the test fails. 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Work logged] (BEAM-6947) TestGCSIO.test_last_updated (gcsio_test.py) fails when the current timezone offset and the timezone offset on 2nd of Jan 1970 differ

2019-04-02 Thread ASF GitHub Bot (JIRA)


 [ 
https://issues.apache.org/jira/browse/BEAM-6947?focusedWorklogId=221803=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-221803
 ]

ASF GitHub Bot logged work on BEAM-6947:


Author: ASF GitHub Bot
Created on: 02/Apr/19 15:48
Start Date: 02/Apr/19 15:48
Worklog Time Spent: 10m 
  Work Description: lukecwik commented on issue #8180: [BEAM-6947] Fix for 
failing TestGCSIO.test_last_updated (gcsio_test.py) test
URL: https://github.com/apache/beam/pull/8180#issuecomment-479061751
 
 
   R: @chamikaramj 
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 221803)
Time Spent: 20m  (was: 10m)

> TestGCSIO.test_last_updated (gcsio_test.py) fails when the current timezone 
> offset and the timezone offset on 2nd of Jan 1970 differ
> 
>
> Key: BEAM-6947
> URL: https://issues.apache.org/jira/browse/BEAM-6947
> Project: Beam
>  Issue Type: Bug
>  Components: sdk-py-core
>Reporter: Csaba Kassai
>Assignee: Csaba Kassai
>Priority: Major
>  Time Spent: 20m
>  Remaining Estimate: 0h
>
> The test TestGCSIO.test_last_updated uses timestamp 123456.78 as the last 
> updated timestamp.  This timestamp is converted into a naive datetime in the 
> Fakefile class get_metadata method (gcsio_test.py line 72) Then in the GcsIO 
> class last_updated method (gcsio.py ) is converted back to timestamp. But the 
> conversion is incorrect when the the timezone offset is different in 1970 and 
> now. In my case now Singapore is GMT+8 and it was only GMT+7:30 in 1970. So 
> the test fails. 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)