Is this an RC filter in the circuit for a nightlight?
1) C1 is a power-dropping element to reduce the high mains voltage down to something more appropriate for a string of LEDs.  R1 is typically there to discharge C1 when the power is removed.

2) The 1N4007 is rated for 1000V. Since diodes are so remarkably inexpensive, it is false economy to use a lower-voltage rated diode in such a potentially dangerous circuit to save literally a few pennies. NOT RECOMMENDED to substitute a lower-voltage rated diode in this circuit. It is already living on the edge. No future in tempting fate.

3) You can't really accurately measure the value of most components IN CIRCUIT. Because of the influence of the other connected components. If you want an accurate measurement, you must measure/test it OUT-OF CIRCUIT.

3a) Furthermore, note that C1 should be a special "Y type" capacitor which is rated, designed, manufactured and tested for use in direct mains connection. Use of an ordinary capacitor for C1 is a serious fire hazard and NOT RECOMMENDED.

4) This is a critical and potentially dangerous circuit. Unless you have significant experience with direct mains-connected circuits like this it is NOT RECOMMENDED that you make ANY changes to the circuit.  Furthermore, since you can't know what many of the component ratings are from observations, you are putting yourself at considerable risk attempting to reproduce this circuit.

Recommend finding "BigClive" on YouTube. He has done a tear-down and circuit analysis of this very "flower LED night-light" and many similar cheap Chinese LED products.  Highly recommended.

Ref: https://www.youtube.com/channel/UCtM5z2gkrGRuWd0JQMx76qA