漏洞
| 漏洞 ID 编号 | BUG-000164222 |
|---|---|
| 已提交 | January 9, 2024 |
| 上次修改时间 | August 28, 2025 |
| 适用范围 | Portal for ArcGIS |
| 找到的版本 | 11.1 |
| 操作系统 | Windows Server |
| 操作系统版本 | 2016 64 Bit |
| 状态 | Known Limit |
There are two workarounds for the defect.
# import modules
import datetime
from arcgis.gis import GIS
# establish a connection to the Portal
gis = GIS("portal url", "username", "password")
# get the web map
web_map = gis.content.get("web map item id")
# access to the web map JSON
web_map_data = web_map.get_data()
# access to the time slider properties
time_slider_properties = web_map_data['widgets']['timeSlider']['properties']
# access time slider old end time
time_slider_end_time = time_slider_properties.get('endTime')
# input the new end time
# An example of answer for the input question: 2024-01-09-19-00-00
datetime_info = input("Specify the new end time in YYYY-MM-DD-HH-MM-SS format:")
# define the new end time based on 13-digit datetime format
year, month, day, hour, minute, second = map(int, datetime_info.split('-'))
new_end_time_info = datetime.datetime(year, month, day, hour, minute, second)
new_end_time = int(datetime.datetime.timestamp(new_end_time_info)*1000)
# assign the new value to the end time
end_time_dict = {'endTime':new_end_time}
# update the time slider properties
time_slider_properties.update(end_time_dict)
# define web map properties based on the update applied to the end time
web_map_properties = {"text": web_map_data}
# update the web map using web_map_properties variable
web_map.update(item_properties=web_map_properties)
漏洞 ID: BUG-000164222
软件:
获取来自 ArcGIS 专家的帮助
下载 Esri 支持应用程序