Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

azure.storage.filedatalake.PathProperties last_modified property is string not datetime #16019

Closed
marcin-vt opened this issue Jan 7, 2021 · 2 comments
Assignees
Labels
bug This issue requires a change to an existing behavior in the product in order to be resolved. Client This issue points to a problem in the data-plane of the library. customer-reported Issues that are reported by GitHub users external to the Azure organization. Storage Storage Service (Queues, Blobs, Files)

Comments

@marcin-vt
Copy link

  • Package Name: azure-storage-file-datalake
  • Package Version: 12.2.0
  • Operating System: Ubuntu 16.04
  • Python Version: 3.6.9

Describe the bug
azure.storage.filedatalake.PathProperties last_modified property is string not datetime - as described in documentation and also in the code itself

:ivar datetime last_modified: A datetime object representing the last time the directory/file was modified.

To Reproduce
Steps to reproduce the behavior:

from azure.storage.filedatalake import DataLakeServiceClient
t_fsc = DataLakeServiceClient(account_url="{}://{}.dfs.core.windows.net".format(
    "https", sa), credential=sa_key).get_file_system_client(file_system=container)
l = t_fsc.get_paths().next().last_modified
print(f'{type(l)}: {l}')

The above code prints out:
<class 'str'>: Wed, 16 Dec 2020 14:45:33 GMT

Expected behavior
last_modified should return datetime value.

@ghost ghost added needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. customer-reported Issues that are reported by GitHub users external to the Azure organization. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that labels Jan 7, 2021
@xiangyan99 xiangyan99 added Client This issue points to a problem in the data-plane of the library. Storage Storage Service (Queues, Blobs, Files) labels Jan 7, 2021
@ghost ghost removed the needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. label Jan 7, 2021
@tasherif-msft tasherif-msft self-assigned this Jan 8, 2021
@xiafu-msft
Copy link
Contributor

Hi @marcin-vt

Thanks for catch this bug. We posted a fix #16093

If it's blocking you, feel free to install this .whl file after unzip it,
the commant is pip install <path/to/>azure_storage_file_datalake-12.2.1-py2.py3-none-any.whl
azure_storage_file_datalake-12.2.1-py2.py3-none-any.zip

@xiafu-msft xiafu-msft added bug This issue requires a change to an existing behavior in the product in order to be resolved. and removed question The issue doesn't require a change to the product in order to be resolved. Most issues start as that labels Jan 12, 2021
@marcin-vt
Copy link
Author

Thanks for fixing it @xiafu-msft.

@github-actions github-actions bot locked and limited conversation to collaborators Apr 12, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug This issue requires a change to an existing behavior in the product in order to be resolved. Client This issue points to a problem in the data-plane of the library. customer-reported Issues that are reported by GitHub users external to the Azure organization. Storage Storage Service (Queues, Blobs, Files)
Projects
None yet
Development

No branches or pull requests

4 participants