Generating a bill using chargeback public API /internal/metering/price results in the Start and End date time is set to 12AM UTC to 12UTC regardless of what is entered for the billingStartTime and billingEndTime provided in the request payload
search cancel

Generating a bill using chargeback public API /internal/metering/price results in the Start and End date time is set to 12AM UTC to 12UTC regardless of what is entered for the billingStartTime and billingEndTime provided in the request payload

book

Article ID: 383738

calendar_today

Updated On:

Products

VMware Aria Suite

Issue/Introduction

  • Generating a bill using Chargeback public API and entering in the billingStartTime and billingEndTime to match EET/GMT or any other timezone is not being honored
  • The bill Start Date time and End Date time is set to UTC time as default , so the bill Start Date time and End Date time that is passed in the API call is converted to UTC format.  
  • For example customer in Eastern European Timezone generates a bill using chargeback public API where he passes billingStartTime and billingEndTime as 12 AM EET , the bill Start Date and End Date shows as 2:00AM UTC time. 

Environment

Aria Operations 8.18

Chargeback 8.18 

Cause

Expected behavior that the bill Start Date and End Date will be in UTC format

Resolution

Please ensure you take snapshots before making changes 

There are 2 options , the preferred option would be option 1, but please find more details on both options below:

  • Option 1: Change "timeZoneUsedInMeteringCalculation" property in $ALIVE_BASE/user/conf/analytics/advanced.properties to your chosen timezone and then use the /api/chargeback/bills public API.  For below example we are setting the pricing engine timezone to use Europe/Tallinn
    1. Open ssh as root to Aria Operations primary node
    2. Open $ALIVE_BASE/user/conf/analytics/advanced.properties file 
    3. Add in the property timeZoneUsedInMeteringCalculation=Europe/Tallinn 
    4. Restart the analytics service via "service vmware-vcops restart analytics" command
    5. Try generate the bill again using /api/chargeback/bills public API

Note if you upgrade to a later version of Aria Operations that you check $ALIVE_BASE/user/conf/analytics/advanced.properties is still in tact, you may need to update this file again with your chosen timezone again.  

  • Option 2: Use /internal/metering/price with the internal API instead of the public API this will consider the startTime and endTime and it will provide the price and usage metrics in response.  However internal APIs may not be supported in Future Releases. 

 

The preferred option to apply would be option 1.