English
Time
About 254 wordsLess than 1 minute
2026-01-09
Time
Time - Represents time in hh:mm format, enclosed in double quotes when used.
Summary
Define Time: Time time = "hh:mm"
Example:
Time time = "09:30"
Time type methods:
```text
- Time.now(): Gets the current time in hours and minutes
Example:
```text
Time t = Time.now()
```text
- time.withHour(`<Integer hour>`): Sets the hour of time and returns a new time
Return type: Time
Example:
```text
time.withHour(13) //Returns: 13:30
```text
- time.withMinute(`<Integer minute>`): Sets the minutes of time and returns a new time
Return type: Time
Example:
```text
time.withMinute(50) //Returns: 09:50
```text
- time.toTimestamp(): Converts time to timestamp
Return type: BigDecimal
Example:
```text
time.toTimestamp() //Returns: 4260000
```text
- time.hour: Gets the hour component of time
Example:
```text
time.hour //Returns: 9
```text
- time.minute: Gets the minute component of time
Example:
```text
time.minute //Returns: 30
```text
## Changelog
| Version | Date | Changes | Author |
| --- | --- | --- | --- |
| v1.0 | 2026-05-20 | Initial version | |
## Background
This document provides detailed information about the Time API functionality and usage, helping developers integrate relevant capabilities.
## Applicable Scenarios
Specific applicable scenarios are determined by actual business needs. Developers can select the appropriate API for integration as required.
## Prerequisites
- Access to Fxiaoke Open Platform
- Application authorization and configuration completed
- Basic knowledge of relevant business domain
## Steps
Please refer to the detailed instructions for each API.
## Notes
- Ensure prerequisites are met before calling APIs
- Pay attention to API call frequency limits
- Refer to error code documentation for exception handling
> **Compatibility:** This version currently has no deprecated or compatibility notes.