Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
Copyright (c) Quectel Wireless Solution, Co., Ltd.All Rights Reserved.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
33 changes: 33 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# QuecPython Enhanced Time & TimeZone

[中文](README_ZH.md) | English

## Overview

QuecPython utime method can only support the east and west 12 time zone, but in practice, some countries with borders across the international date line in order to maintain national date unity, the original territorial date of UTC-11 is pushed forward by one day, that is, from UTC-11 plus 24H, is UTC+13. This method can extend the time zone to UTC-12 to UTC+14.

At the same time, the utime method does not have a convenient way to set the time, so it needs to call the API of setting the time in RTC separately, and it needs to convert the date format. This method provides a method of obtaining/setting the local time in a consistent format.

Finally, this method provides a more flexible mktime method, which can add the time zone parameter and directly obtain the time stamp of the specified time zone.

## Usage

- [API Reference Manual](./docs/en/API_Reference.md)

## Contribution

We welcome contributions to improve this project! Please follow these steps to contribute:

1. Fork the repository.
2. Create a new branch (`git checkout -b feature/your-feature`).
3. Commit your changes (`git commit -m 'Add your feature'`).
4. Push to the branch (`git push origin feature/your-feature`).
5. Open a Pull Request.

## License

This project is licensed under the Apache License. See the [LICENSE](LICENSE) file for details.

## Support

If you have any questions or need support, please refer to the [QuecPython documentation](https://python.quectel.com/doc/en) or open an issue in this repository.
33 changes: 33 additions & 0 deletions README_ZH.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# QuecPython 增强型时间及时区

中文 | [English](README.md)

## 概述

QuecPython utime方法只能支持东西十二时区,但在实际应用中,某些国境横跨国际日期变更线的国家为保持全国日期统一,将原属UTC-11的领土日期前推一天,即从UTC-11加24H,是为UTC+13。该方法可以拓展时区至为UTC-12至UTC+14。

同时,utime方法没有便捷的设定时间的方法,需要另外调用RTC中设置时间的API,并且需要对日期格式做转换,本方法提供格式一致的获取/设置本地时间的方法。

最后,本方法提供了更为灵活的mktime方法,可以增加加时区参数,直接获取指定时区的时间戳。

## 用法

- [API 参考手册](./docs/zh/API参考手册.md)

## 贡献

我们欢迎对本项目的改进做出贡献!请按照以下步骤进行贡献:

1. Fork 此仓库。
2. 创建一个新分支(`git checkout -b feature/your-feature`)。
3. 提交您的更改(`git commit -m 'Add your feature'`)。
4. 推送到分支(`git push origin feature/your-feature`)。
5. 打开一个 Pull Request。

## 许可证

本项目使用 Apache 许可证。详细信息请参阅 [LICENSE](LICENSE) 文件。

## 支持

如果您有任何问题或需要支持,请参阅 [QuecPython 文档](https://python.quectel.com/doc) 或在本仓库中打开一个 issue。
Loading